#!/usr/bin/env python3 import itertools import sys W = int(input()) H = int(input()) N = int(input()) Shand = [False] * (W + 1) Khand = [False] * (H + 1) count = 0 Shand[0] = True Khand[0] = True rest = [] for line in sys.stdin: S, K = map(int, line.split()) Shand[S] = True Khand[K] = True for s, k in itertools.product(Shand, Khand): if s or k: continue count += 1 rest.append((s, k)) print(W * H - count - N)