// NOTE: it is recommended to use this even if you don't understand the following code.

#include <assert.h>
#include <stdio.h>
#include <stdlib.h>

#define MAXN 200000

int C, K, N, R, i;
int cc[MAXN], rr[MAXN];

int main() {
    // uncomment the two following lines if you want to read/write from files
    // freopen("input.txt", "r", stdin);
    // freopen("output.txt", "w", stdout);

    assert(3 == scanf("%d%d%d", &R, &C, &N));
    
    for (i = 0; i < N; ++i)
        assert(2 == scanf("%d%d", &rr[i], &cc[i]));
    
    K = 0;
    
    
    // INSERT YOUR CODE HERE
    
    
    printf("%d\n", K);

    return 0;
}
