using namespace std;
#include <iostream>
#include <algorithm>
#define Nmax 1001

int v[Nmax], best[Nmax][Nmax];
pair<int, int> leaves[Nmax];


int main()
{
	int i, j, k, l, d, n, m;

	cin >> d >> n >> m;

	for (i = 1; i <= n; ++i) cin >> v[i];
	sort(v, v + n);

	for (i = 0; i < m; ++i) cin >> leaves[i].first >> leaves[i].second;

	for (j = 0; j < Nmax; ++j) best[0][i] = 0;

	for (i = 1; i <= n; ++i)
		for (j = 0; j < Nmax; ++j)
			if (v[i] > j) best[i][j] = -1;
			else
	{
		best[i][j] = -1;

		for (k = 0; k < m; ++k)
			if (leaves[k].first <= v[i] && v[i] <= leaves[k].second && leaves[k].second <= j)
			{
				for (l = i; l >= 1 && v[l] >= leaves[k].first; --l);
				if (best[l][leaves[k].first - 1] == -1) continue;
				if (1 + best[l][leaves[k].first - 1] < best[i][j] || best[i][j] == -1) best[i][j] = 1 + best[l][leaves[k].first - 1];
			}
	}

	cout << best[n][Nmax - 1] << '\n';

    return 0;
}