#include <iostream>
#include <cstdio>
#include <algorithm>

using namespace std;

#define DIM 1005

int D, M, I;

struct inter {
    int x, y;
} interval[DIM];

int Sick[DIM], F[DIM], L[DIM], Sol[DIM];

bool cmp(inter a, inter b) {
    return a.x < b.x;
}

void verif(int pos);
int bin_search(int x);

int main() {
    #ifndef ONLINE_JUDGE
    freopen("input.txt","r",stdin);
    #endif // ONLINE_JUDGE

    cin >> D >> M >> I;

    for(int i = 1; i <= M; ++i) {
        cin >> Sick[i];
    }

    sort(Sick + 1, Sick + 1 + M);

    for(int i = 1; i <= I; ++i) {
        cin >> interval[i].x >> interval[i].y;
    }

    sort(interval + 1, interval + 1 + I, cmp);

    for(int i = 1; i <= I; ++i) {
        verif(i);
    }

    cout << Sol[0] << '\n';

    return 0;
}

void verif(int pos) {
    int lastluat = bin_search(interval[pos].y);
    int firstluat = bin_search(interval[pos].x);

    if(Sick[firstluat + 1] > interval[pos].y) {
        return ;
    }

    int okey = 1;

    while(Sol[0] > 0 && okey) {
        if(interval[Sol[Sol[0]]].y >= interval[pos].x && F[Sol[0]] < firstluat) {
            okey = 0;
            break;
        }
        else {
            if(interval[Sol[Sol[0]]].y < interval[pos].x) {
                break;
            }
        }

        --Sol[0];
    }

    if(okey) {
        Sol[++Sol[0]] = pos;
        F[Sol[0]] = firstluat;
        L[Sol[0]] = lastluat;
    }
}

int bin_search(int x) {
    int put = 1;

    while(put <= M) {
        put <<= 1;
    }

    put >>= 1;

    int pos = 0;

    while(put) {
        if(pos + put <= M) {
            if(Sick[pos + put] < x) {
                pos += put;
            }
        }

        put >>= 1;
    }

    return pos;
}