A chessboard n × m in size is given. During the zero minute we repaint all the black squares to the 0 color. During the i-th minute we repaint to the i color the initially black squares that have exactly four corner-adjacent squares painted i - 1 (all such squares are repainted simultaneously). This process continues ad infinitum. You have to figure out how many squares we repainted exactly x times.The upper left square of the board has to be assumed to be always black. Two squares are called corner-adjacent, if they have exactly one common point.

The first line contains integers n and m (1 ≤ n, m ≤ 5000). The second line contains integer x (1 ≤ x ≤ 109).

Print how many squares will be painted exactly x times.

uses
    math;
var
    n,m,i,j:word;
    k,x,d:longword;

function blackcount(w,h:word):longword;
begin
if (w mod 2 = 0)and(h mod 2 = 0) then
    blackcount := (w*h) div 2
else if (w mod 2 = 0)and(h mod 2 = 1) then
    blackcount := (w*(h-1)) div 2+w div 2
else if (w mod 2 = 1)and(h mod 2 = 0) then
    blackcount := ((w-1)*h) div 2+h div 2
else
    blackcount := ((w-1)*(h-1)) div 2+h div 2+w div 2+1;
end;

begin
readln(n,m);
readln(x);
d := min((n+1)div 2,(m+1)div 2);
if x>d then
    k := 0
else if x=d then
    if (n mod 2 = 1) or (m mod 2 = 1) then
        k := 1
    else
        k := 2
else
    k := blackcount(n-2*(x-1),m-2*(x-1))-blackcount(n-2*x,m-2*x);
writeln(k);
{readln;}
end.

var m,n,x,r,rr:longint;

function calc(m,n,x:longint):longint;
var re,a,b,c,u,v:longint;
begin
     a:=x; b:=m-x+1; c:=n-x+1;
     u:=b-a+1; v:=c-a+1;
     if (u<0) or (v<0) then calc:=0
     else calc:=(u*v+1) shr 1;
end;

begin
     read(m,n,x);
     r:=calc(m,n,x);
     rr:=calc(m,n,x+1);
     writeln(r-rr);
end.

const fi = '';
      fo = '';
var n, m, k: longint;
begin
  assign(input,fi); reset(input);
  assign(output,fo); rewrite(output);

  readln(n,m);
  readln(k);
  n:=n-2*(k-1);
  m:=m-2*(k-1);
  if (n > 0) and (m > 0) then
    if n = 1 then writeln((m+n) div 2)
    else writeln(m+n-2)
  else writeln(0);

  close(input); close(output);
end.

var
 k,i,j,res,q,n,m,c,x,y,z : longint;
begin
 readln(n,m,q);
 for i:=1 to n do for j:=1 to m do if not odd(i+j) then
 begin
  k:=i;
  if j < i then k:=j;
  if n-i+1 < k then k:=n-i+1;
  if m-j+1 < k then k:=m-j+1;
  if k=q then inc(res);
 end;
 writeln(res);
end.

var
 n,m,x,i,j,x1,y1,x2,y2,sum:longint;
begin
 readln(n,m);
 readln(x);
 x1:=1;
 y1:=1;
 x2:=n;
 y2:=m;
 for i:=1 to x-1 do
 begin
  inc(x1);
  inc(y1);
  dec(x2);
  dec(y2);
  if (x1>x2)or(y1>y2) then
  begin
   writeln(0);
   halt;
  end;
 end;
 for i:=x1 to x2 do for j:=y1 to y2 do if odd(i)=odd(j) then
 begin
  if (i=x1)or(i=x2)or(j=y1)or(j=y2) then inc(sum);
 end;
 writeln(sum);
end.

var res,i,j,n,m,k:longint;
   function mm(a,b:longint):longint;
    begin
      if a>b then mm:=b
             else mm:=a;
    end;
  begin
    read(n,m,k);
    res:=0;
    for i:=1 to n do
     for j:=1 to m do
      if ( mm( mm(i,n-i+1),mm(j,m-j+1) ) = k ) and
         ( not odd(i+j) ) then inc(res);
    Writeln(res);
  end.

{ fp }
VAr
 n,m,k,ans:Longint;
 Begin
  REad(n,m,k);
  dec(k);
  n := n-2*k;
  m := m-2*k;
  If (n<1) or (m<1) then WriteLn(0)
   else
   Begin
    If (n=1) or (m=1) then ans := n+m-1
                      else ans := (2*(n+m)-4);
    WriteLn((ans+1) div 2);
   End;
 End.

uses Math;
var n,m,i,j,k,x,res,el:longint;
    a:array[0..5001,0..5001] of longint;
begin
readln(n,m);
readln(x);
res:=0;
for i:= 1 to n do
for j:= 1 to m do
if (i+j) mod 2 = 0 then begin
                         el:=min(min(i,j),min(n-i+1,m-j+1));
                         if el=x then res:=res+1;
                        end;
writeln(res);
end.

uses math;
var xx,n,m,x,i,j,x1,x2,x3,x4:longint;
ans:longint;
 begin
  read(n,m,x);
  for i:=1 to n do
   begin
    for j:=1 to m do
     if not odd(i+j) then
      begin
       x1:=min(i,j);
       x2:=min(n-i+1,j);
       x3:=min(i,m-j+1);
       x4:=min(n-i+1,m-j+1);
       xx:=min(min(min(x1,x2),x3),x4);
       if xx=x then ans:=ans+1;
      end;
   end;
  writeln(ans);
 end.

var
  i,j,n,m,x,sx,sy,ex,ey,res:longint;
begin
  read(n,m,x);
  sx:=x;sy:=x;
  ex:=n-x+1;ey:=m-x+1;
  res:=0;
  for i:=sx to ex do for j:=sy to ey do begin
    if (i<>sx)and(i<>ex)and(j<>sy)and(j<>ey)then continue;
    inc(res,1-((i+j)and 1));
  end;
  writeln(res);
end.

uses math;
var ans,i,j,n,m,k:longint;
  begin
    read(n,m,k);
    ans:=0;
    for i:=1 to n do
     for j:=1 to m do
      if (min(min(i,n-i+1),min(j,m-j+1))=k) and
         ((i+j) mod 2=0) then ans := ans+1;
      Writeln(ans);
  end.

var
n,m,x,i,j,k,ans:longint;
begin
readln(n,m);
readln(x);
k:=x;
x:=x-1;
if (k>2500)or(n-x*2<=0)or(m-x*2<=0) then ans:=0
else begin
 ans:=(n-x*2)*(m-x*2) div 2;
 if ((n-k*2)>0)and((m-k*2)>0) then begin
 ans:=ans-(n-k*2)*(m-k*2) div 2;
 if (n-k*2)*(m-k*2) mod 2<>0 then dec(ans);
 end;

if (n-2*x)*(m-2*x) mod 2<>0 then inc(ans);
 end;
writeln(ans);
end.

uses math;
Var                   ans,i,j,n,m,k:longint;
 function dist(x,y:longint):longint;
   begin
     dist:=min(min(x-1,n-x),min(y-1,m-y))+1;
   end;
  Begin
    Read(n,m,k);
    ans:=0;
    for i:=1 to n do
      for j:=1 to m do
        if (dist(i,j)=k)and((i+j)mod 2=0) then inc(ans);
    Writeln(ans);
  End.

var n,m,x,l,a,b:longint;
 begin
  read(n,m,x);
  l:=1;
  while (l<x) do
   begin
    dec(n,2);
    dec(m,2);
    inc(l);
    if n<=0 then begin
                  n:=0;
                  break;
                 end;
    if m<=0 then begin
                  m:=0;
                  break;
                 end;
   end;
  if l=x then begin
               a:=n*m div 2+n*m mod 2;
               dec(n,2);
               dec(m,2);
               if n<0 then n:=0;
               if m<0 then m:=0;
               b:=n*m div 2+n*m mod 2;
               writeln(a-b);
              end
         else writeln(0);
 end.

program     cfr39_b;
const
    nfin=   '';
    nfout=  '';

var
    m, n, x, i:    longint;
    fin, fout:  text;

begin
    assign(fin, nfin); reset(fin);
    assign(fout, nfout); rewrite(fout);
        read(fin, m, n);
        read(fin, x);

        i:=1;
        while (x>i) and (m>0) and (n>0) do begin
            i:=i+1; m:=m-2; n:=n-2;
        end;

        if (m>0) and (n>0) then begin
            if m=1 then writeln((n+1) div 2)
            else if n=1 then writeln((m+1) div 2)
            else writeln((m+n) - 2);
        end
        else writeln(0);
    close(fout);
    close(fin);
end.

var
 n,i,j,x,m,a1,kol:longint;
function min(a,b,c,d:longint):longint;
 begin
  if (a<=b)and(a<=c)and(a<=d) then min:=a
     else if (b<=a)and(b<=c)and(b<=d) then min:=b
          else if (c<=a)and(c<=b)and(c<=d) then min:=c
               else min:=d;
 end;
begin
 read(n,m,x);
 for i:=1 to m do
  begin
   if i mod 2=0 then
   for j:=1 to n do
    begin
     if j mod 2=0 then begin
                        a1:=min(j-1,n-j,i-1,m-i)+1;
                        if a1=x then kol:=kol+1;
                       end;
    end
    else for j:=1 to n do
     if j mod 2=1 then begin
                        a1:=min(j-1,n-j,i-1,m-i)+1;
                        if a1=x then kol:=kol+1;
                       end;
  end;
  write(kol);
end.

var
        n,m,x,kq:longint;
procedure nhap;
var
        i:longint;
begin
        readln(n,m);
        readln(x);
        if m<n then
        begin
                kq:=m; m:=n; n:=kq;
        end;
        n:=n-(x-1)*2; m:=m-(x-1)*2;
        if (n<=0) or (m<=0) then
        begin
                writeln(0);
                exit;
        end;
        if n=1 then
        begin
                kq:=(m+1) div 2;
                writeln(kq);
                exit;
        end;
        kq:=2*((n+1) div 2);
        kq:=kq+2*((m+1) div 2);
        if (n+m) mod 2=1 then kq:=kq-3
        else
        if (n mod 2=1) and (m mod 2=1) then kq:=kq-4
        else kq:=kq-2;
        writeln(kq);

end;
begin
        nhap;
end.

uses math;
const fi = 'repaint.inp';
      fo = 'repaint.out';
var n,m,x,i,j,cshd,cshc,cscd,cscc,smi,dem:longint;
    kt:boolean;
begin
  //assign(input,fi);reset(input);
  //assign(output,fo);rewrite(output);

  readln(n,m);
  readln(X);

  smi:=min(n,m);
  smi:=(smi div 2) + (smi mod 2);

  if x > smi then write(0)
  else
    begin
      cshc:=n-x+1;
      cshd:=x;
      cscd:=x;
      cscc:=m-x+1;
      // cs : chi so, hd : hang dau....
      kt:=odd(cshd);
      for i:=cscd to cscc do
        if kt=odd(i) then inc(dem);

      kt:=odd(cshc);
      if cshc>cshd then
      for i:=cscd to cscc do
        if kt=odd(i) then inc(dem);

      kt:=odd(cscd);
      for i:=cshd+1 to cshc-1 do
        if kt=odd(i) then inc(dem);

      kt:=odd(cscc);
      if cscc>cscd then
      for i:=cshd+1 to cshc-1do
        if kt=odd(i) then inc(dem);
      //result
      write(dem);
    end;
end.

uses math;
const fi = 'repaint.inp';
      fo = 'repaint.out';
var n,m,x,i,j,cshd,cshc,cscd,cscc,smi,dem:longint;
    kt:boolean;
begin
  //assign(input,fi);reset(input);
  //assign(output,fo);rewrite(output);

  readln(n,m);
  readln(X);

  smi:=min(n,m);
  smi:=(smi div 2) + (smi mod 2);

  if x > smi then write(0)
  else
    begin
      cshc:=n-x+1;
      cshd:=x;
      cscd:=x;
      cscc:=m-x+1;
      // cs : chi so, hd : hang dau....
      kt:=odd(cshd);
      for i:=cscd to cscc do
        if kt=odd(i) then inc(dem);

      kt:=odd(cshc);
      if cshc>cshd then
      for i:=cscd to cscc do
        if kt=odd(i) then inc(dem);

      kt:=odd(cscd);
      for i:=cshd+1 to cshc-1 do
        if kt=odd(i) then inc(dem);

      kt:=odd(cscc);
      if cscc>cscd then
      for i:=cshd+1 to cshc-1do
        if kt=odd(i) then inc(dem);
      //result
      write(dem);
    end;
  readln;
end.

uses math; const size=5000;
var
  cnt:array[1..size] of longint; l1,l2,n,m,x,i,j:longint;

begin
  readln(n,m); readln(x);
  for i:=1 to n do for j:=1 to m do
  begin
    if (odd(i+j)) then continue;
    l1:=min(i,n-i+1); l2:=min(j,m-j+1);
    inc(cnt[min(l1,l2)]);
  end;
  if (x>size) then writeln(0) else writeln(cnt[x]);
end.

var
   xx,yy: array [0..100000]of longint;

  n,m ,nn,rez,i,sum,j: longint;
  x : int64;
begin
  readln(n,m);
   readln(x);
  { if n mod  2 = 0 then
   nn:=  n div  2
   else  nn:=  n div  2+1;
   if m mod  2 = 0 then
   rez:=  n *(m div  2)
   else   rez:=  n* (m div  2)+nn;

   xx[i]:= rez; }
   if x>=2501   then
       begin
    writeln(0);
    exit;
    end;

   i:=0;

   while (n>=1) and (m>=1 ) do
   begin
    inc(i);
  if n mod  2 = 0 then
   nn:=  n div  2
   else  nn:=  n div  2+1;
   if m mod  2 = 0 then
   rez:=  n *(m div  2)
   else   rez:=  n* (m div  2)+nn;

   xx[i]:= rez;
   n:=n-2;
   m:=m-2;
    end;
    yy[i]:= xx[i];
    sum:=0;
    for j:=i downto 2 do
    begin
    yy[j-1]:= xx[j-1]- xx[j];
     end;
    writeln(yy[x]);
end.

var
  x,y,n,m,k:longint;

function cnt(const x, y:longint):longint;
begin
  if (x<0)or(y<0) then cnt:=0 else
  cnt:=(x*y) shr 1 + (x*y) and 1;
end;

begin
  read(n, m, k);
  x:=n-2*(k-1);
  y:=m-2*(k-1);
  if (x<0)or(y<0) then writeln(0)else writeln(cnt(x, y)-cnt(x-2, y-2));
end.

WBW
BWB
WBW

{$MODE DELPHI}
uses sysutils,math;
var n,m,x,i,j,r:longint;
begin
read(n,m);
read(x);
r:=0;
for i:=1 to n do
  for j:=1 to m do
    if (min(min(i,j),min(n-i+1,m-j+1))=x) and (not odd(i+j)) then inc(r);
write(r);
end.

program cf;

{$APPTYPE CONSOLE} {$o- r+ q+}

uses
  SysUtils;

type
  int = integer;

var
  n, m, x: int;

  function f(x: integer):integer;
  var
    nn, mm: integer;
  begin
    nn := n - 2*(x);
    mm := m - 2*(x);
    result:=0;
    if (nn>0) and (mm>0) then
      result:=((nn+1) div 2 )*((mm+1)div 2) + ((nn-(nn+1) div 2))*((mm - (mm+1) div 2));
  end;
begin
//  Reset(Input, 'input.txt');
  //Rewrite(Output, 'output.txt');

  read(n,m,x);

  {q := ((n+1) div 2)-(x-1);
  p := ((m+1) div 2)-(x-1);
  k := (q * p) + (((n - q)-(x-1)) * ((m - q)-(x-1)));

  q  := ((n+1) div 2)-(x);
  p  := ((m+1) div 2)-(x);
  k1 := (q * p) + (((n-q)-x) * ((m-q)-x));

  k := k - k1;

  if k < 0 then
    write(0)
  else
    write(k);                                        }
  write(f(x-1) - f(x));

  Close(Input);
  Close(Output);
end.

program Problem_B;

{$APPTYPE CONSOLE}

var n, m, x, a, b, c, d, s1, s2 : longint;

procedure Swap(var a, b : longint);
var c : longint;
begin
   c := a;
   a := b;
   b := c;
end;

begin
   assign(input, '');
   assign(output, '');
   read(n, m, x);

   if (m < n)
      then Swap(n, m);

   if (x > (n + 1) div 2)
      then writeln('0')
      else begin
           a := n - x - x + 2;
           b := m - x - x + 2;
           c := a - 2;
           d := b - 2;

           if (c < 0) or (d < 0)
              then begin
                   c := 0;
                   d := 0;
                   end;

           if ((a * b) mod 2 = 0)
              then s1 := (a * b) div 2
              else s1 := (a * b) div 2 + 1;

           if ((c * d) mod 2 = 0)
              then s2 := (c * d) div 2
              else s2 := (c * d) div 2 + 1;

           writeln(s1 - s2);
           end;
   close(input);
   close(output);
end.

program prgB;

{$APPTYPE CONSOLE}
{$O-}
{$R+}
{$Q+}

uses
  SysUtils, Math;

var
  n, m, r, x: int64;

function num(n, m: integer): integer;
begin
  if n - 2 * x = 1 then begin
    result := (m - 2 * x) div 2 + (m - 2 * x) mod 2;
  end else if m - 2 * x = 1 then begin
    result := (n - 2 * x) div 2 + (n - 2 * x) mod 2;
  end else if ((n - 2 * x) mod 2 = 0) and ((m - 2 * x) mod 2 = 0) then begin
    result := 2 * (((n - 2 * x) div 2) + (n - 2 * x) mod 2) + 2 * (((m - 2 * x)
      div 2) + (m - 2 * x) mod 2) - 2;
  end else if ((n - 2 * x) mod 2 = 1) and ((m - 2 * x) mod 2 = 0) then begin
    result := 2 * (((m - 2 * x) div 2) + (m - 2 * x) mod 2) + 2 * (((n - 2 * x)
      div 2) + (n - 2 * x) mod 2) - 3
  end else if ((n - 2 * x) mod 2 = 0) and ((m - 2 * x) mod 2 = 1) then begin
    result := 2 * (((n - 2 * x) div 2) + (n - 2 * x) mod 2) + 2 * (((m - 2 * x)
      div 2) + (m - 2 * x) mod 2) - 3
  end else
    result := 2 * (((n - 2 * x) div 2) + (n - 2 * x) mod 2) + 2 * (((m - 2 * x)
      div 2) + (m - 2 * x) mod 2) - 4;
end;

begin
  //reset(input, 'input.txt');
  //rewrite(output, 'output.txt');
  read(n, m, x);
  x := x - 1;
  if ((n - 2 * x) >= 1) and ((m - 2 * x) >= 1) then
    writeln(num(n, m))
  else
    writeln(0);
end.

program Project1;

{$APPTYPE CONSOLE}

var
  a,b,m,n,ans,ans1,s,x:LongInt;
begin
  Readln(n,m);
  Readln(x);
  Dec(x);
  a:=n;
  b:=m;
  n:=n-(2*x);
  m:=m-(2*x);
  ans:=0;
  if (n>0) and (m>0) then
  begin
    s:=n*m;
    ans:=s div 2;
    if s mod 2=1 then Inc(ans);
    Inc(x);
    a:=a-(2*x);
    b:=b-(2*x);
    ans1:=0;
    if (a>0) and (b>0) then
    begin
    s:=a*b;
    ans1:=s div 2;
    if s mod 2=1 then Inc(ans1);
    end;
    ans:=ans-ans1;
  end;
  Writeln(ans);
  readln;
end.

program Project2;

{$APPTYPE CONSOLE}

uses
  SysUtils;
var ans,n,m,x:integer;
begin
//  reset(input,'input.txt');
//  rewrite(output,'output.txt');
  readln(n,m);
  readln(x);
  dec(n,2*x-2);
  dec(m,2*x-2);
  if (n<0)or(m<0) then begin
    writeln(0);
    halt(0);
  end;
  ans:=((2*n) div 2)*(m div 2)+((n div 2)+(n mod 2))*(m mod 2);
  dec(n,2);
  dec(m,2);
  if (n<0)or(m<0) then begin
    writeln(ans);
    halt(0);
  end;
  dec(ans,((2*n) div 2)*(m div 2)+((n div 2)+(n mod 2))*(m mod 2));
  writeln(ans);

end.

 {uses crt; }
 label 1;
 const nn=5000;
    type {extended=real;}
    mass=array [0..nn,0..nn] of integer;
       var x,mm,s,p, n,i,j,k,l,imin,sm,t,m,maxs:longint;
       xl,yl,xk,yk:longint;
       b:mass;
 function    prov(x,y:longint):boolean; {true - ne b'et}
       var yy:boolean; i,j:longint;
  begin  yy:=true;
  if (x=xl) or (y=yl) then yy:=false;
  if (abs(x-xk)=1)and(abs(y-yk)=2) then yy:=false;
  if (abs(x-xk)=2)and(abs(y-yk)=1) then yy:=false;
  if (abs(x-xl)=1)and(abs(y-yl)=2) then yy:=false;
  if (abs(x-xl)=2)and(abs(y-yl)=1) then yy:=false;
   prov:=yy;

  end;

      function min(x,y:longint):longint;
 begin  min:=x;if y<x then min:=y;      end;
 function max(x,y:longint):longint;
 begin  max:=x;if y>x then max:=y;      end;

     begin   { clrscr;
     assign(input,'input.txt'); reset (input);}
    read(m,n);  read(x);
   for i:=1 to m do for j:=1 to n do if  not odd(i+j)
   then b[i,j]:=min(i-1,min(j-1,min(m-i,n-j)))+1;

  { for i:=1 to m do begin for j:=1 to n do write(b[i,j],' ');writeln; end; }
   for i:=1 to m do for j:=1 to n do if b[i,j]=x then inc(s);

     writeln(s);

      end.

program JJ_Mybabe;
  {$APPTYPE CONSOLE}  {$o-}
uses SysUtils,Math;
var
    m,n,ui,uj,di,dj,i,x:integer;
    mark:array[1..5000,1..5000] of boolean;
function check(k,p:integer):boolean;
begin
  if ((k mod 2=0) and (p mod 2=0)) or (( k mod 2<>0) and (p mod 2<>0)) then result:=true else result:=false;
end;
function get:integer;
  var
       i,j:integer;
begin
  result:=0;
  for i:=ui to di do
    if (not mark[i][dj])
      then
      begin
        mark[i][dj]:=true;
        if check(i,dj) then inc(result);
      end;

  for i:=ui to di do
    if (not mark[i][uj])
      then
      begin
        mark[i][uj]:=true;
        if check(i,uj) then inc(result);
      end;

   for j:=uj to dj do
    if (not mark[ui][j])
      then
      begin
        mark[ui][j]:=true;
        if check(ui,j) then inc(result);
      end;

   for j:=uj to dj do
    if (not mark[di][j])
      then
      begin
        mark[di][j]:=true;
        if check(di,j) then inc(result);
      end;

end;
procedure print(k:integer);
begin
  write(k);
  halt(0);
end;
begin
// reset(input,'input.txt');
// rewrite(output,'output.txt');
 read(n,m,x);
 ui:=1; uj:=1; di:=n; dj:=m;
 for i:=1 to x-1 do
 begin
  inc(ui); inc(uj);
  dec(di); dec(dj);
  if (ui>di) or (uj>dj) then print(0);
 end;
 if (ui>di) or (uj>dj) then print(0);
 print(get);
end.

{$A8,B-,C+,D+,E-,F-,G+,H+,I+,J-,K-,L+,M-,N+,O-,P+,Q-,R-,S-,T-,U-,V+,W-,X+,Y+,Z1}

{$APPTYPE CONSOLE}

uses
  Math;

type
  int = integer;

var
  n, m, i, j, c, x : integer;
  ans : int64;

procedure init;
begin
  read(n, m, x);
end;

procedure main;
begin
  ans := 0;
  for i := 1 to n do
    for j := 1 to m do
      if (i mod 2 = j mod 2) then begin
        c := min(min(i, j), min(n - i + 1, m - j + 1));
        if c = x then
          ans := ans + 1;
      end;
  writeln(ans);
end;

begin
  //reset(input, 'input.txt');
 // rewrite(output, 'output.txt');

  init;
  main;

  //close(input);
 // close(output);
end.

program solution;

{$APPTYPE CONSOLE}

uses
  SysUtils,
  Math;

var
  n, m, x, i, j, ans : integer;

begin
  //reset(input, 'input.txt');
  //rewrite(output, 'output.txt');
  read(n, m, x);
  ans := 0;
  for i := 1 to n do
    for j := 1 to m do
      if (min(min(i, n - i + 1), min(j, m - j + 1)) = x) and ((i + j) mod 2 = 0) then
        inc(ans);
  writeln(ans);
end.

var kol,i,l,l1,n,m,x:longint;
begin
//  Assign(input,'input.txt');
//  Assign(output,'output.txt');
  l:=1; l1:=1;
  Read(n,m,x);
  if x>1000000
  then x:=1000000;
  for i:=1 to x-1 do
  begin
    inc(l); inc(l1);
    Dec(n); dec(m);
  end;
  if (l>n)or(l1>m)
  then begin Writeln(0); Halt(0); end;
  if l mod 2=l1 mod 2
  then begin
        kol:=0;
        x:=0;
        for i:=l1 to m do
        begin
          x:=x xor 1;
          kol:=kol+x;
        end;
        for i:=l+1 to n do
        begin
          x:=x xor 1;
          kol:=kol+x;
        end;

        for i:=l1+1 to m do
        begin
          x:=x xor 1;
          kol:=kol+x;
        end;
        for i:=l+1 to n-1 do
        begin
          x:=x xor 1;
          kol:=kol+x;
        end;
        Writeln(kol);
       end
  else begin
        kol:=0;
        x:=1;
        for i:=l1 to m do
        begin
          x:=x xor 1;
          kol:=kol+x;
        end;
        for i:=l+1 to n do
        begin
          x:=x xor 1;
          kol:=kol+x;
        end;

        for i:=l1+1 to m do
        begin
          x:=x xor 1;
          kol:=kol+x;
        end;
        for i:=l+1 to n-1 do
        begin
          x:=x xor 1;
          kol:=kol+x;
        end;
        Writeln(kol);
       end;
end.

program Project1;

{$APPTYPE CONSOLE}

uses
  SysUtils;

var n, m, x, n2, m2, k : longint;
begin
//  reset(input,'input.txt');
//  rewrite(output,'output.txt');
   k := 0;
   read(n, m, x);
   n := n - (x - 1)*2;
   m := m - (x - 1)*2;
   n2 := n - 2;
   m2 := m - 2;
   if (n <= 0) or (m <= 0) then
   begin
     writeln(0);
     halt(0);
   end;
   if m mod 2 = 0 then
     k := n*(m div 2)
   else
   begin
     if n mod 2 = 0 then
       k := ((m div 2) + 1)*(n div 2) + (n div 2)*(m div 2)
     else
       k := ((m div 2) + 1)*((n div 2) + 1) + (n div 2)*(m div 2);
   end;
   n := n2;
   m := m2;
   if (n <= 0) or (m <= 0) then
   begin
     writeln(k);
     halt(0);
   end;
   if m mod 2 = 0 then
     k := k - n*(m div 2)
   else
   begin
     if n mod 2 = 0 then
       k := k - (((m div 2) + 1)*(n div 2) + (n div 2)*(m div 2))
     else
       k := k - (((m div 2) + 1)*((n div 2) + 1) + (n div 2)*(m div 2));
   end;
  write(k);
//  close(input);
//  close(output);
end.

var i,j,n,m:integer;
    x,res:longint;

begin
readln(n,m);
readln(x);
dec(x);
if (n-2*x=1)or(m-2*x=1) then res:=1 else
begin

res:=(n-2*x)+(m-2*x)-2;

if (res<0)or(x>2501)or(m-2*x<0)or(n-2*x<0) then res:=0;
end;
write(res);

end.

program shablon;

{$APPTYPE CONSOLE}

uses
  SysUtils,Math;
var
    n,m,x,l,r,l1,r1,mx,a,i,j:integer;
begin
    //assign(input,'input.txt');reset(input);
    //assign(output,'output.txt');rewrite(output);
    read(n,m,x);
    x := x - 1;
    if min(n,m) < 2*x + 1 then
    begin
        writeln(0);
        halt(0);
    end;
    l := x + 1;
    r := x + 1;
    l1 := n - (x );
    r1 := m - (x );
    a := 0;
    for i :=l to l1 do
        for j := r to r1 do
        begin
            if ((i + j) mod 2 = 0) and ((i = l ) or (l1 = i ) or (j = r ) or (r1= j)) then
                inc(a);
        end;
    writeln(a);
    //close(input);
    //close(output);
end.

{$APPTYPE CONSOLE}

uses
  SysUtils;
var n,m,x:int64;
function f(x:integer):int64;
var a,b:integer;
begin
 a:=n-x;
 b:=m-x;
 if (a<=0) or (b<=0) then f:=0
 else
  f:=a*b div 2 + (a  mod 2)*(b mod 2);
end;
begin
  readln(n,m);
  readln(x);
  writeln(f(2*x-2)-f(2*x));
end.

//Yerzhan Dyussenaliyev
Uses Math;
var
	n, m, k, c, ans, x, y, pr, col: longint;

begin
//    reset(input, 'a.in');
//    rewrite(output, 'a.out');

    read(n, m, k);

	ans := 0;
	c := 0;
  	x := n;
  	y := m;
	col := (n * m + 1) div 2;
 	 while (x > 0) and (y > 0) do begin
		inc(c);
    	pr := (max(1, x) * max(1, y) + 1) div 2;
		if c = k then begin
      		dec(x, 2);
      		dec(y, 2);
      		if (x > 0) and (y > 0) then col := (max(1, x) * max(1, y) + 1) div 2 else col := 0;
      		ans := pr - col;
    	end;
		x := x - 2;
		y := y - 2;
	end;

	writeln(ans);
end.

Var
   n,m,x,r,t:Integer;
Function ans(x:Integer):Integer;
Begin
   ans:=x div 2 + x mod 2;
End;
Begin
   Read(n,m,x);
   If n>m Then Begin
      t:=n;
      n:=m;
      m:=t;
   End;
   If ans(n)<x Then r:=0
   Else If (ans(n)=x) and (n mod 2<>0) Then r:=ans(m-(x-1)*2)
   Else r:=n+m-4*x+2;
   Write(r);
End.

var

  x,r,a,b,i,j,k,l,n,m,t:int64;

begin
  {assign(input,'input.txt');
  assign(output,'output.txt');
  reset(input);
  rewrite(output);}
  read(n,m);
  read(x);
  x:=x-1;

  n:=n-2*x;
  m:=m-2*x;

  if (n<=0) or ( m<=0) then write('0') else
  if n=1 then
    begin
    if m mod 2=0 then write(m div 2);
    if m mod 2 =1  then
    write(m div 2 +1);

    end

    else

  if m=1 then
  begin
    if n mod 2=0 then write(n div 2);
    if n mod 2 =1  then
      write (n div 2 +1);

    end

  else
  write(m+n-2);

  {close(input);
  close(output);}
end.

program zB;

{$APPTYPE CONSOLE}

uses
  SysUtils;

var f:array[0..50000]of longint;
    n,m,x,k,i:longint;

begin
  //reset(input,'input.txt');
  //rewrite(output,'output.txt');
  read(n,m,x);
  k:=0;
  for i:=1 to 5000 do
  begin
    if (n-k<=0)or(m-k<=0)then break;
    f[i]:=((n-k)*(m-k)+1)div 2;
    k:=k+2;
  end;
  if x>5000 then writeln(0) else writeln(f[x]-f[x+1]);
end.

program task;

{$APPTYPE CONSOLE}
{$MAXSTACKSIZE 1000000000}
{$O+,R-,S-,Q-,I-}

uses
  SysUtils, Math;

var n,m,x,sum,i,j:integer;

begin
  //reset(input,'input.txt');
  //rewrite(output,'output.txt');
  read(n,m,x);
  dec(x);
  n:=n-x*2;
  m:=m-x*2;
  sum:=0;
  for i:=1 to n do
    for j:=1 to m do
      if ((i=1) or (i=n) or (j=1) or (j=m)) and ((i mod 2) xor (j mod 2) = 0)
        then inc(sum);
  writeln(sum);
//  readln;readln;
end.

program problem_B;

{$APPTYPE CONSOLE}

uses
  SysUtils;

var n, m, ans, i, j, x: longint;

function prov(i, j: longint): boolean;
begin
  if ((i mod 2 <> 0) and (j mod 2 <> 0))
     or ((i mod 2 = 0) and (j mod 2 = 0)) then prov := true else prov := false;
end;

begin
 readln(n, m);
 readln(x);
 dec(x);

 for i := x + 1 to n - x do
   for j := x + 1 to m - x do
     if prov(i, j) then inc(ans);

 for i := x + 2 to n - x - 1 do
   for j := x + 2 to m - x - 1 do
     if (prov(i - 1, j - 1)) and (prov(i + 1, j + 1))
     and (prov(i - 1, j + 1))and (prov(i + 1, j - 1)) and (prov(i, j))then dec(ans);

 writeln(ans);
 readln;
end.

program perekr;

{$APPTYPE CONSOLE}

uses
  SysUtils;
var x,a,b,m,n,s:integer;
function min(a,b:integer):integer;
Begin
if a<=b then min:=a else min:=b;
End;

Begin
  readln(n,m); read(x);
  s:=0;
  for a:=1 to n do
    for b:=1 to m do
      if (min(min(a,b),min(n-a+1,m-b+1))=x)and((a+b) mod 2=0) then
        s:=s+1;

  write(s);
end.

uses math;

var n,m,x,k,i,j:integer;

begin
  read(n,m,x);
  k:=0;
  for i:=1 to n do
    for j:=1 to m do
      if ( ((odd(i)) and (odd(j))) or ((not odd(i)) and (not odd(j))) ) and (x=min(min(i,j),min(n-i+1,m-j+1))) then inc(k);
  write(k)
end.

{$R+,S+,Q+,I+,O-}
{R-,S-,Q-,I-,O+}
var
  n,m,x,i,j,u,ans: longint;
begin
//  assign(input,'in'); reset(input);
//  assign(output,'out'); rewrite(output);
  read(n,m,x);
  ans:=0;
  for i:=1 to n do
    for j:=1 to m do
      if (i+j) and 1 = 0 then
      begin
        u:=i;
        if j < u then u:=j;
        if n-i+1 < u then u:=n-i+1;
        if m-j+1 < u then u:=m-j+1;
        if u = x then inc(ans);
      end;
  writeln(ans);
  close(input);
  close(output);
end.

program ProblemB;

{$APPTYPE CONSOLE}

uses
  SysUtils;

var n, m, x, curr, c: longint;

function count(i, j: longint): longint;
begin
  if (i <= 0) or(j <= 0)then result := 0 else
    if i * j mod 2 = 0 then result := (i * j) div 2 else
      result := ((i - 1) * j) div 2 + (i + 1)div 2;
end;

begin
//reset(input, 'input.txt'); rewrite(output, 'output.txt');
  read(n, m, x);
  curr := count(n, m);
  c := 1;
  while (n > 0)and(m > 0)do
  begin
    n := n - 2;
    m := m - 2;
    if c = x then
    begin
      writeln(curr - count(n, m));
      halt(0);
    end;
    curr := count(n, m);
    inc(c);
  end;
  writeln(0);
end.

program Project1;

{$APPTYPE CONSOLE}

uses
  SysUtils;

function Count(a, b: Int64): Int64;
begin
  if (a <= 0) or (b <= 0) then
    Result := 0
  else
    Result := (a*b div 2) + (a*b mod 2);
end;

var
  a, b: Int64;
  x: Int64;

begin
  readln(a, b);
  readln(x);
  if x = 0 then
    writeln(Count(a, b))
  else
    begin
      while (x > 1) and (a > 0) and (b > 0) do
        begin
          Dec(x); Dec(a, 2); Dec(b, 2);
        end;
      if x = 1 then
        writeln(Count(a, b)-Count(a-2, b-2))
      else
        writeln(0);
    end;
  readln;
end.

program Project2;

{$APPTYPE CONSOLE}

uses
  SysUtils, Math;
var n,m,x,s,i:Longint;
begin
// Reset(input,'in.txt');
// Rewrite(Output,'out.txt');
 read(n,m,x);
 if x>Min(n,m) then
  begin
    write(0);
    Halt(0);
  end;
 Dec(x);
 for i:=1 to x do
  begin
   Dec(n,2);
   Dec(m,2);
  end;
 if (n<0)or(m<0) then
  begin
    write(0);
    Halt(0);
  end;
 s:=((n*m) div 2) +((n*m) mod 2);
 n:=Max(0,n-2);
 m:=Max(0,m-2);
 s:=s-(((n*m) div 2) +((n*m) mod 2));
 write(s);
end.

var n, m, k, i, x1, x2: longint;
begin
  readln(n, m);
  readln(k);
  for i := 1 to k - 1 do begin
    dec(m, 2);
    dec(n, 2);
  end;
  if (m <= 0) or (n <= 0) then begin
    x1 := 0;
  end else begin
    x1 := ((n * m + (n * m mod 2)) div 2);
  end;
  dec(m, 2);
  dec(n, 2);
  if (m <= 0) or (n <= 0) then begin
    x2 := 0;
  end else begin
    x2 := ((n * m + (n * m mod 2)) div 2);
  end;
  writeln(x1 - x2);
end.

Uses Math;
var
   n,m,x,i,j,ans,k  :   longint;
begin
    read(n,m,x);
    ans:=0;
    for i:=1 to n do
        for j:=1 to m do
            if (i + j) mod 2 = 0 then begin
                if i > j then k:=j - 1 else k:=i - 1;
                if n - i > m - j then k:=min(k,m - j) else k:=min(k,n - i);
                if k + 1 = x then inc(ans);
            end;
    write(ans);
end.

{$Apptype console}
var x, y, ans, i, j, n, m : longint;
    a : array [-1..6000, -1..6000] of longint;
begin
  read(n, m, x);
  a[0, 1] := 0;
  for i := 1 to n do
    begin
      if a[i - 1, 1] = 0 then a[i, 1] := 1 else a[i, 1] := 0;
      for j := 2 to m do
        if a[i, j - 1] = 1 then a[i, j] := 0 else a[i, j] := 1;
    end;
  dec(x);
  ans := 0;
  for i := x + 1 to n - x do
    for j := x + 1 to m - x do
      if a[i, j] = 1 then inc(ans);

  for i := x + 2 to n - x - 1 do
    for j := x + 2 to m - x - 1 do
      if a[i, j] = 1 then dec(ans);

  write(ans);
end.

uses sysutils,math;
var n,m,x,i,j,r:longint;
begin
read(n,m);
read(x);
r:=0;
for i:=1 to n do
  for j:=1 to m do
    if (min(min(i,j),min(n-i+1,m-j+1))=x) and (not odd(i+j)) then inc(r);
write(r);
end.

uses
    math;
var
    n,m,i,j:word;
    k,x,d:longword;

function blackcount(w,h:word):longword;
begin
if (w mod 2 = 0)and(h mod 2 = 0) then
    blackcount := (w*h) div 2
else if (w mod 2 = 0)and(h mod 2 = 1) then
    blackcount := (w*(h-1)) div 2+w div 2
else if (w mod 2 = 1)and(h mod 2 = 0) then
    blackcount := ((w-1)*h) div 2+h div 2
else
    blackcount := ((w-1)*(h-1)) div 2+h div 2+w div 2+1;
end;

begin
readln(n,m);
readln(x);
d := min((n+1)div 2,(m+1)div 2);
if x>d then
    k := 0
else
    k := blackcount(n-2*(x-1),m-2*(x-1))-blackcount(n-2*x,m-2*x);
writeln(k);
{readln;}
end.

uses
    math;
var
    n,m,i,j,d:word;
    k,x:longword;

function blackcount(w,h:word):word;
begin
if (w mod 2 = 0)and(h mod 2 = 0) then
    blackcount := (w*h) div 2
else if (w mod 2 = 0)and(h mod 2 = 1) then
    blackcount := (w*(h-1)) div 2+w div 2
else if (w mod 2 = 1)and(h mod 2 = 0) then
    blackcount := ((w-1)*h) div 2+h div 2
else
    blackcount := ((w-1)*(h-1)) div 2+h div 2+w div 2+1;
end;

begin
readln(n,m);
readln(x);
d := min((n+1)div 2,(m+1)div 2);
if x>d then
    k := 0
else if x=d then
    k := 1
else
    k := blackcount(n-2*(x-1),m-2*(x-1))-blackcount(n-2*x,m-2*x);
writeln(k);
readln;
end.

uses
    math;
var
    n,m,i,j:word;
    k,x,d:longword;

function blackcount(w,h:word):longword;
begin
if (w mod 2 = 0)and(h mod 2 = 0) then
    blackcount := (w*h) div 2
else if (w mod 2 = 0)and(h mod 2 = 1) then
    blackcount := (w*(h-1)) div 2+w div 2
else if (w mod 2 = 1)and(h mod 2 = 0) then
    blackcount := ((w-1)*h) div 2+h div 2
else
    blackcount := ((w-1)*(h-1)) div 2+h div 2+w div 2+1;
end;

begin
readln(n,m);
readln(x);
d := min((n+1)div 2,(m+1)div 2);
if x>d then
    k := 0
else if x=d then
    k := 1
else
    k := blackcount(n-2*(x-1),m-2*(x-1))-blackcount(n-2*x,m-2*x);
writeln(k);
{readln;}
end.

var
    n,m,i,j:word;
    k,x,t:longword;
    a,a2:array[1..5000,1..5000] of longint;
    change:boolean;

procedure add(x,y:word);
begin
if (x>1)and(x<n)and(y>1)and(y<m) then
    if (a[x-1,y-1]=a[x+1,y+1])and(a[x+1,y-1]=a[x-1,y+1])and(a[x+1,y-1]=a[x+1,y+1])and(a[x-1,y-1]=t-1) then
        begin
        a[x,y] := t;
        change := true;
        end;
end;

procedure minute;
begin
for i:=1 to n do
    for j:=1 to m do
        if ((i mod 2=1)and(j mod 2=1))or((i mod 2=0)and(j mod 2=0)) then
            begin
            add(i,j);
            end
        else
            a[i,j]:=-1;

end;

procedure check;
begin
change:=false;
for i:=1 to n do
    begin
    for j:=1 to m do
        if a[i,j]<>a2[i,j] then
            begin
            change:=true;
            break;
            end;
    if change then
        break;
    end;
if change then
    for i:=1 to n do
        for j:=1 to m do
            a2[i,j]:=a[i,j];
end;

begin
t:=0;
fillchar(a,sizeof(a),0);
fillchar(a2,sizeof(a2),0);

readln(n,m);
readln(x);
change:=false;
repeat
    inc(t);
    minute;
    check;
until not change;

k :=0;
for i:=1 to n do
    for j:=1 to m do
        if a[i,j]=x-1 then
            inc(k);
writeln(k);
end.

var
 k,i,j,res,q,n,m,c,x,y,z : longint;
begin
 readln(n,m,q);
 for i:=1 to n do for j:=1 to m do if not odd(i+j) then
 begin
  k:=i;
  if n-i+1 < k then k:=n-i+1;
  if m-j+1 < k then k:=m-j+1;
  if k=q then inc(res);
 end;
 writeln(res);
end.

var
 n,m,x,i,j,x1,y1,x2,y2,sum:longint;
begin
 readln(n,m);
 readln(x);
 x1:=1;
 y1:=1;
 x2:=n;
 y2:=m;
 for i:=1 to x-1 do
 begin
  inc(x1);
  inc(y1);
  dec(x2);
  dec(y2);
  if (x1>x2)or(y1>y2) then
  begin
   writeln(0);
   halt;
  end;
 end;
 for i:=x1 to x2 do for j:=y1 to y2 do if odd(i)=odd(j) then
 begin
  if (i=x1)or(j=x2)or(j=y1)or(j=y2) then inc(sum);
 end;
 writeln(sum);
end.

Var n,m,x,i,j,ans,res:longint;
    a:Array[-10..5001,-10..5001]of Longint;
 BEgin
  readln(n,m);
  readln(x);
  if X>2 then BEgin WRiteln(0); halt(0); end;
  For i:=1 to n do
   for j:=1 to m do
    if (i+j) mod 2=0 then a[i,j] := 1;
  For i:=1 to n do
   for j:=1 to m do
    if (a[i,j]=1)and(a[i+1,j+1]=1)and(a[i-1,j+1]=1)and(a[i+1,j-1]=1)and(a[i-1,j-1]=1)
    then inc(res);
  if x=2 then begin writeln(res); halt(0); end;
  ans := 0;
  FOr i:=1 to n do
   for j:=1 to m do
    if a[i,j]=x then inc(ans);
   WRiteln(ans-res);
 End.

Var n,m,x,i,j,ans:longint;
    a:Array[-10..5001,-10..5001]of byte;
 BEgin
  readln(n,m);
  readln(x);
  if X>2 then BEgin WRiteln(0); halt(0); end;
  For i:=1 to n do
   for j:=1 to m do
    if (i+j) mod 2=0 then a[i,j] := 1;
  For i:=1 to n do
   for j:=1 to m do
    if (a[i,j]=1)and(a[i+1,j+1]=1)and(a[i-1,j+1]=1)and(a[i+1,j-1]=1)and(a[i-1,j-1]=1)
    then a[i,j] := 2;
  ans := 0;
  FOr i:=1 to n do
   for j:=1 to m do
    if a[i,j]=x then inc(ans);
   WRiteln(ans);
 End.

var
n,m,x,i,j,k,ans:longint;
begin
readln(n,m);
readln(x);
k:=x;
x:=x-1;
if (k>2500)or(n-x*2<=0)or(m-x*2<=0) then ans:=0
else begin
 ans:=(n-x*2)*(m-x*2) div 2;
 if ((n-k*2)and(m-k*2)>0) then begin
 ans:=ans-(n-k*2)*(m-k*2) div 2;
 if (n-k*2)*(m-k*2) mod 2<>0 then dec(ans);
 end;

if (n-2*x)*(m-2*x) mod 2<>0 then inc(ans);
 end;
writeln(ans);
end.

var
a,b:array [1..5000,1..5000] of longint;
n,m,x,i,j,k,ans:longint;
begin
readln(n,m);
readln(x);
for i:=1 to n do begin
    for j:=1 to m do begin
        if (i+j) mod 2=0 then begin
        a[i,j]:=0;
        b[i,j]:=1;
        end
        else begin
        a[i,j]:=-1;
        b[i,j]:=0;
        end;
    end;
end;
ans:=1;
k:=0;
while ans>0 do begin
ans:=0;
    for i:=1 to n-2 do begin
        for j:=1 to m-2 do begin
            if (a[i,j]=k) then begin
               if (a[i+2,j+2]=k)and(a[i+2,j]=k)and(a[i,j+2]=k) then begin
                  a[i+1,j+1]:=k+1;
                  inc(b[i,j]);
                  ans:=1;
               end;
            end;
        end;
    end;
    inc(k);
end;
ans:=0;
for i:=1 to n do begin
    for j:=1 to m do begin
        if b[i,j]=x then inc(ans);
    end;
end;
writeln(ans);
end.

var
n,m,x,i,j,k,ans:longint;
begin
readln(n,m);
readln(x);
k:=x;
x:=x-1;
if (n-x*2<=0)or(m-x*2<=0) then ans:=0
else begin
 ans:=(n-x*2)*(m-x*2) div 2;
 if ((n-k*2)and(m-k*2)>0) then begin
 ans:=ans-(n-k*2)*(m-k*2) div 2;
 if (n-k*2)*(m-k*2) mod 2<>0 then dec(ans);
 end;

if (n-2*x)*(m-2*x) mod 2<>0 then inc(ans);
 end;
writeln(ans);
end.

var
a,b:array [1..5000,1..5000] of longint;
n,m,x,i,j,k,ans:longint;
begin
readln(n,m);
readln(x);
for i:=1 to n do begin
    for j:=1 to m do begin
        if (i+j) mod 2=0 then begin
        a[i,j]:=0;
        b[i,j]:=1;
        end
        else begin
        a[i,j]:=-1;
        b[i,j]:=0;
        end;
    end;
end;
ans:=1;
k:=0;
while ans>0 do begin
ans:=0;
    for i:=k+2 to n-k-1 do begin
        for j:=k+2 to m-k-1 do begin
                  a[i+1,j+1]:=k+1;
                  inc(b[i,j]);
                  ans:=1;
        end;
    end;
    inc(k);
end;
ans:=0;
for i:=1 to n do begin
    for j:=1 to m do begin
        if b[i,j]=x then inc(ans);
    end;
end;
writeln(ans);
end.

var n,m,x,l,a,b:longint;
 begin
  read(n,m,x);
  l:=1;
  while (l<x) and (n>0) and (m>0) do
   begin
    dec(n,2);
    dec(m,2);
    inc(l);
    if n<=0 then n:=0;
    if m<=0 then m:=0;
   end;
  if l=x then begin
               a:=n-2;
               b:=m-2;
               if a<0 then a:=0;
               if b<0 then b:=0;
               writeln(n*m-a*b)
              end
         else writeln(0);
 end.

var
        n,m,x,kq:longint;
procedure nhap;
var
        i:longint;
begin
        readln(n,m);
        readln(x);
        n:=n-(x-1)*2; m:=m-(x-1)*2;
        if (n<=0) or (m<=0) then
        begin
                writeln(0);
                exit;
        end;
        if n=1 then
        begin
                kq:=(m+1) div 2;
                writeln(kq);
                exit;
        end;
        if m=1 then
        begin
                kq:=(n+1) div 2;
                writeln(kq);
                exit;
        end;
        kq:=2*((n+1) div 2);
        kq:=kq+2*((m+1) div 2);
        if m mod 2=0 then kq:=kq-3
        else kq:=kq-4;
        writeln(kq);

end;
begin
        nhap;
end.

var
        n,m,x,kq:longint;
procedure nhap;
var
        i:longint;
begin
        readln(n,m);
        readln(x);
        if m<n then
        begin
                kq:=m; m:=n; n:=kq;
        end;
        n:=n-(x-1)*2; m:=m-(x-1)*2;
        if (n<=0) or (m<=0) then
        begin
                writeln(0);
                exit;
        end;
        if n=1 then
        begin
                kq:=(m+1) div 2;
                writeln(kq);
                exit;
        end;
        kq:=2*((n+1) div 2);
        kq:=kq+2*((m+1) div 2);
        if (n+m) mod 2=1 then kq:=kq-3
        else
        if (n mod 2=1) and (m mod 2=1) then kq:=kq-4;
        writeln(kq);

end;
begin
        nhap;
end.

var
        n,m,x,kq:longint;
procedure nhap;
var
        i:longint;
begin
        readln(n,m);
        readln(x);
        if m<n then
        begin
                kq:=m; m:=n; n:=kq;
        end;
        n:=n-(x-1)*2; m:=m-(x-1)*2;
        if (n<=0) or (m<=0) then
        begin
                writeln(0);
                exit;
        end;
        if n=1 then
        begin
                kq:=(m+1) div 2;
                writeln(kq);
                exit;
        end;
        if m=1 then
        begin
                kq:=(n+1) div 2;
                writeln(kq);
                exit;
        end;
        kq:=2*((n+1) div 2);
        kq:=kq+2*((m+1) div 2);
        if m mod 2=0 then kq:=kq-3
        else kq:=kq-4;
        writeln(kq);

end;
begin
        nhap;
end.

var
   xx,yy: array [0..100000]of longint;

  n,m ,nn,rez,i,sum,j: longint;
  x : longint;
begin
  readln(n,m);
   readln(x);
  { if n mod  2 = 0 then
   nn:=  n div  2
   else  nn:=  n div  2+1;
   if m mod  2 = 0 then
   rez:=  n *(m div  2)
   else   rez:=  n* (m div  2)+nn;

   xx[i]:= rez; }
   i:=0;

   while (n>=1) or (m>=1 ) do
   begin
    inc(i);
  if n mod  2 = 0 then
   nn:=  n div  2
   else  nn:=  n div  2+1;
   if m mod  2 = 0 then
   rez:=  n *(m div  2)
   else   rez:=  n* (m div  2)+nn;

   xx[i]:= rez;
   n:=n-2;
   m:=m-2;
    end;
    yy[i]:= xx[i];
    sum:=0;
    for j:=i downto 2 do
    begin
    yy[j-1]:= xx[j-1]- xx[j];
     end;
    writeln(yy[x]);
end.

var
   xx,yy: array [0..100000]of longint;

  n,m ,nn,rez,i,sum,j: longint;
  x : int64;
begin
  readln(n,m);
   readln(x);
  { if n mod  2 = 0 then
   nn:=  n div  2
   else  nn:=  n div  2+1;
   if m mod  2 = 0 then
   rez:=  n *(m div  2)
   else   rez:=  n* (m div  2)+nn;

   xx[i]:= rez; }
   if x>=2501   then
       begin
    writeln(yy[x]);
    exit;
    end;

   i:=0;

   while (n>=1) or (m>=1 ) do
   begin
    inc(i);
  if n mod  2 = 0 then
   nn:=  n div  2
   else  nn:=  n div  2+1;
   if m mod  2 = 0 then
   rez:=  n *(m div  2)
   else   rez:=  n* (m div  2)+nn;

   xx[i]:= rez;
   n:=n-2;
   m:=m-2;
    end;
    yy[i]:= xx[i];
    sum:=0;
    for j:=i downto 2 do
    begin
    yy[j-1]:= xx[j-1]- xx[j];
     end;
    writeln(yy[x]);
end.

var
   xx,yy: array [0..100000]of longint;

  n,m ,nn,rez,i,sum,j: longint;
  x : longint;
begin
  readln(n,m);
   readln(x);
  { if n mod  2 = 0 then
   nn:=  n div  2
   else  nn:=  n div  2+1;
   if m mod  2 = 0 then
   rez:=  n *(m div  2)
   else   rez:=  n* (m div  2)+nn;

   xx[i]:= rez; }
   i:=0;

   while (n>=1) or (m>=1 ) do
   begin
    inc(i);
  if n mod  2 = 0 then
   nn:=  n div  2
   else  nn:=  n div  2+1;
   if m mod  2 = 0 then
   rez:=  n *(m div  2)
   else   rez:=  n* (m div  2)+nn;

   xx[i]:= rez;
   n:=n-2;
   m:=m-2;
    end;
    yy[i]:= xx[i];
    sum:=0;
    for j:=i downto 1 do
    begin
    sum:=sum+xx[j];
    yy[j-1]:= xx[j-1]- sum;
     end;
    writeln(yy[x]);
end.

var
   xx,yy: array [0..100000]of longint;

  n,m ,nn,rez,i,sum,j: longint;
  x : int64;
begin
  readln(n,m);
   readln(x);
  { if n mod  2 = 0 then
   nn:=  n div  2
   else  nn:=  n div  2+1;
   if m mod  2 = 0 then
   rez:=  n *(m div  2)
   else   rez:=  n* (m div  2)+nn;

   xx[i]:= rez; }
   if x>=2501   then
       begin
    writeln(0);
    exit;
    end;

   i:=0;

   while (n>=1) or (m>=1 ) do
   begin
    inc(i);
  if n mod  2 = 0 then
   nn:=  n div  2
   else  nn:=  n div  2+1;
   if m mod  2 = 0 then
   rez:=  n *(m div  2)
   else   rez:=  n* (m div  2)+nn;

   xx[i]:= rez;
   n:=n-2;
   m:=m-2;
    end;
    yy[i]:= xx[i];
    sum:=0;
    for j:=i downto 2 do
    begin
    yy[j-1]:= xx[j-1]- xx[j];
     end;
    writeln(yy[x]);
end.

program Project1;

{$APPTYPE CONSOLE}

var
  a,b,m,n,ans,dl,s,x:LongInt;
begin
  Readln(n,m);
  Readln(x);
  Dec(x);
  n:=n-(2*x);
  m:=m-(2*x);
  ans:=0;
  if (n>0) and (m>0) then
  begin
    dl:=2*n+2*(m-2);
    ans:=dl div 2;
  end;
  Writeln(ans);
end.

program Project1;

{$APPTYPE CONSOLE}

var
  a,b,m,n,ans,ans1,s,x:LongInt;
begin
  Readln(n,m);
  Readln(x);
  Dec(x);
  a:=n;
  b:=n;
  n:=n-(2*x);
  m:=m-(2*x);
  ans:=0;
  if (n>0) and (m>0) then
  begin
    s:=n*m;
    ans:=s div 2;
    if s mod 2=1 then Inc(ans);
    Inc(x);
    a:=a-(2*x);
    b:=b-(2*x);
    ans1:=0;
    if (a>0) and (b>0) then
    begin
    s:=a*b;
    ans1:=s div 2;
    if s mod 2=1 then Inc(ans1);
    end;
    ans:=ans-ans1;
  end;
  Writeln(ans);
  readln;
end.

program solution;

{$APPTYPE CONSOLE}

uses
  SysUtils,
  Math;

var
  n, m, x, i, j, ans : integer;

begin
  //reset(input, 'input.txt');
  //rewrite(output, 'output.txt');
  read(n, m, x);
  ans := 0;
  for i := 1 to n do
    for j := 1 to m do
      if (min(min(i, n - x + 1), min(j, m - x + 1)) = x) and ((i + j) mod 2 = 0) then
        inc(ans);
  writeln(ans);
end.

program solution;

{$APPTYPE CONSOLE}

uses
  SysUtils,
  Math;

var
  n, m, x, i, j, ans : integer;

begin
  //reset(input, 'input.txt');
  //rewrite(output, 'output.txt');
  read(n, m, x);
  ans := 0;
  for i := 1 to n do
    for j := 1 to m do
      if ((i = x) or (i = n - x + 1)) and ((j = x) or (j = m - x + 1)) and ((i + j) mod 2 = 0) then
        inc(ans);
  writeln(ans);
end.

program Project1;

{$APPTYPE CONSOLE}

uses
  SysUtils;

var n, m, x : longint;
begin
 //  reset(input,'input.txt');
 //  rewrite(output,'output.txt');

   read(n, m, x);
   n := n - (x - 1)*2;
   m := m - (x - 1)*2;
   if (n <= 0) or (m <= 0) then
   begin
     writeln(0);
     halt(0);
   end;
   if m mod 2 = 0 then
     write(n*(m div 2))
   else
   begin
     if n mod 2 = 0 then
       write(((m div 2) + 1)*(n div 2) + (n div 2)*(m div 2))
     else
       write(((m div 2) + 1)*((n div 2) + 1) + (n div 2)*(m div 2));
   end;

 //  close(input);
 //  close(output);
end.

program Project1;

{$APPTYPE CONSOLE}

uses
  SysUtils;

var n, m, x, n2, m2, k : longint;
begin
 // reset(input,'input.txt');
 // rewrite(output,'output.txt');

   read(n, m, x);
   n := n - (x - 1)*2;
   m := m - (x - 1)*2;
   n2 := n - 2;
   m2 := m - 2;
   if (n <= 0) or (m <= 0) then
   begin
     writeln(0);
     halt(0);
   end;
   if m mod 2 = 0 then
     k := n*(m div 2)
   else
   begin
     if n mod 2 = 0 then
       k := ((m div 2) + 1)*(n div 2) + (n div 2)*(m div 2)
     else
       k := ((m div 2) + 1)*((n div 2) + 1) + (n div 2)*(m div 2);
   end;
   n := n2;
   m := m2;
   if (n <= 0) or (m <= 0) then
   begin
     writeln(k);
     halt(0);
   end;
   if m mod 2 = 0 then
     k := k - n*(m div 2)
   else
   begin
     if n mod 2 = 0 then
       k := k - ((m div 2) + 1)*(n div 2) + (n div 2)*(m div 2)
     else
       k := k - ((m div 2) + 1)*((n div 2) + 1) + (n div 2)*(m div 2);
   end;
  write(k);
//  close(input);
//  close(output);
end.

var i,j,n,m,res:integer;
    x:longint;

begin
readln(n,m);
readln(x);
if (n=1)and(m=1)and(x=1) then res:=1 else
begin

x:=x-1;
res:=(n-2*x)+(m-2*x)-2;
end;
if res<0 then res:=0;
write(res);

end.

var i,j,n,m:integer;
    x,res:longint;

begin
readln(n,m);
readln(x);
dec(x);
if (n-2*x=1)and(m-2*x=1) then res:=1 else
begin

res:=(n-2*x)+(m-2*x)-2;

if (res<0)or(x>2501) then res:=0;
end;
write(res);

end.

program shablon;

{$APPTYPE CONSOLE}

uses
  SysUtils,Math;
var
    n,m,x,l,r,l1,r1,mx,a:integer;
begin
    //assign(input,'input.txt');reset(input);
    //assign(output,'output.txt');rewrite(output);
    read(n,m,x);
    x := x - 1;
    if min(n,m) < 2*x + 1 then
    begin
        writeln(0);
        halt(0);
    end;
    l := x + 1;
    r := x + 1;
    l1 := n - (x );
    r1 := m - (x );
    a := ((r1 - r + 2) div 2) * 2 + ((l1 - l + 2) div 2) * 2 ;
    if (n mod 2 = 1) and (m mod 2 = 1) then
        a := a - 4
    else if (n mod 2 = 1) or (m mod 2 = 1) then
        a := a -2;
    if (a = 0) then
        a := 1;
    writeln(a);
    //close(input);
    //close(output);
end.

program shablon;

{$APPTYPE CONSOLE}

uses
  SysUtils,Math;
var
    n,m,x,l,r,l1,r1,mx,a:integer;
begin
    //assign(input,'input.txt');reset(input);
    //assign(output,'output.txt');rewrite(output);
    read(n,m,x);
    x := x - 1;
    if min(n,m) < 2*x + 1 then
    begin
        writeln(0);
        halt(0);
    end;
    l := x + 1;
    r := x + 1;
    l1 := l;
    r1 := r;
    a := 1;
    while (l1 + 2 + x <= n) do
        inc(l1,2);
    while  (r1 + 2 + x <= m) do
        inc(r1,2);
    mx := 0;
    a := ((r1 - r + 2) + (l1 - l + 2) -4);
    if (a = 0) then
        a := 1;
    writeln(a);
    //close(input);
    //close(output);
end.

//Yerzhan Dyussenaliyev
Uses Math;
var
	n, m, k, c, ans, x, y, pr, col: longint;

begin
//    reset(input, 'a.in');
//    rewrite(output, 'a.out');

    read(n, m, k);

	ans := 0;
	c := 0;
  x := n;
  y := m;
	col := max(0, ((x + 1) div 2) * ((y + 1) div 2)) + max(0, ((x - 1) div 2) * ((y - 1) div 2));
  while (x > 0) and (y > 0) do begin
    inc(c);
    pr := max(0, ((x + 1) div 2) * ((y + 1) div 2)) + max(0, ((x - 1) div 2) * ((y - 1) div 2));
		if c = k then begin
      dec(x, 2);
      dec(y, 2);
      col := 0;
      if (x > 0) and (y > 0) then col := max(0, ((x + 1) div 2) * ((y + 1) div 2)) + max(0, ((x - 1) div 2) * ((y - 1) div 2));
      ans := pr - col;
    end;
		x := x - 2;
		y := y - 2;
	end;

	writeln(ans);
end.

uses math;

var n,m,x,k,i,j:integer;

begin
  read(n,m,x);
  k:=0;
  if not odd(n) then dec(n);
  if not odd(m) then dec(m);
  for i:=1 to n do
    for j:=1 to m do
      if ( ((odd(i)) and (odd(j))) or ((not odd(i)) and (not odd(j))) ) and (x=min(min(i,j),min(n-i+1,m-j+1))) then inc(k);
  write(k)
end.

program Project2;

{$APPTYPE CONSOLE}

uses
  SysUtils, Math;
var n,m,x,s:Longint;
begin
 read(n,m,x);
 Dec(x);
 s:=(n-2*x)*(m-2*x);
 Inc(x);
 s:=s-max(n-2*x,0)*max(m-2*x,0);
 write(s div 2 + s mod 2);
end.