#!/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 Srest = W Krest = H Shand = [] Khand = [] for line in sys.stdin: S, K = map(int, line.split()) if S not in Shand: Shand.append(S) Srest -= 1 if K not in Khand: Khand.append(K) Krest -= 1 print(W * H - Srest * Krest - N)