import std.stdio, std.string, std.conv ,std.array,std.algorithm, std.range ,std.math; void main(){ auto W = readln().strip().to!long; auto H = readln().strip().to!long; auto N = readln().strip().to!int; auto S = new int[](N); auto K = new int[](N); foreach(int i; 0 .. N) { auto buf = readln().strip().split().map!(to!int)(); S[i] = buf[0]; K[i] = buf[1]; } immutable sw = S.sort().uniq().array().length; immutable kw = K.sort().uniq().array().length; writeln( H*W - (W-sw)*(H-kw) - N); }