program robotas;

uses crt;
const PRF: string = 'robotas.in';
      RZF:string = 'robotas.out';
type  taskas = record
                 x, y: integer;
                end;
      taskai = array [1..400] of taskas;

   var f: text;

    pilki, sk,  j,   i, m, n, p, x, y  : integer;
       t: taskai;
       kv: array [0..100, 0..100] of boolean;

       procedure nueiti (t1, t2: taskas);
       begin
        //kampas dazomas
        
       
         while t1.y <> t2.y do begin
         //einama y dalis
         if t1.y < t2.y then begin //aukstyn
            kv[t1.x + 1, t1.y + 1] := false;
            t1.y := t1.y + 1;
         end
         else if t1.y > t2.y then begin //zemyn
            kv[t1.x, t1.y] := false;
            t1.y := t1.y - 1;
         end;
       end;

       while t1.x <> t2.x do begin
         //einama x dalis
         if t1.x < t2.x then begin //pirmyn
           kv[t1.x+1, t1.y] := false;
            t1.x := t1.x + 1;
         end
         else if t1.x > t2.x then begin //atgal
            kv[t1.x, t1.y+1] := false;
           t1.x := t1.x - 1;
         end;
        end;
     end;

begin

   assign (f, PRF);
   reset (f);
   readln (f, m, n, p);
   t[1].x := 0; t[1].y := 0;
   for i := 1 to P do  begin
     readln (f, x, y);
     t[i+1].x := x; t[i+1].y := y;
   end;
   
   t[P+2].x := m; t[P+2].y := n;
   
   sk := P + 2;
   
   for i := 1 to m do
     for j := 1 to n do
       kv[i, j] := true; //baltas;
       
       
    for i := 1 to sk - 1 do
       nueiti (t[i], t[i+1]);
       
       
    // kiek pilku kvadrateliu
   pilki := 0;
   for i := 1 to m do
     for j := 1 to n do
       if not kv[i, j] then pilki := pilki + 1;
   
   assign (f, RZF);
   rewrite (f);
   writeln (f, pilki);
   close(f);
end.
