#include<iostream>
using namespace std;
long long n,m,p;
long long sbor;
long long predSbor;
long long nachPrib;
long long kolkoSeProm;
int main()
{
    cin>>m>>n>>p;///
    sbor=(n*(n+1))/2;
    predSbor=sbor;
    nachPrib=n*3+1;
    kolkoSeProm=n-1;
    if(n%2==0)
    {
        for(long long i=1;i<p;i++)
        {
            if(i<=n/2)
            {
                sbor=predSbor+1+kolkoSeProm*nachPrib;
                kolkoSeProm-=2;
                nachPrib-=8;
            }
            else
            {
                if(i==n/2+1)
                {
                    nachPrib-=2;
                    kolkoSeProm=2;
                }
               //cout<<kolkoSeProm<<" "<<nachPrib;
                sbor=predSbor+kolkoSeProm*nachPrib;
                kolkoSeProm+=2;
                if(i!=n/2)
                {
                    nachPrib-=8;
                }
            }
            predSbor=sbor;
        }
    }
   /*else
    {
        nachPrib--;
        for(long long i=1;i<p;i++)
        {
            if(i<n/2)
            {
                sbor=predSbor+1+kolkoSeProm*nachPrib;
                kolkoSeProm-=2;
                nachPrib-=8;
            }
            else
            {
                if(i==n/2+1)
                {
                    nachPrib-=2;
                    kolkoSeProm=2;
                }
               //cout<<kolkoSeProm<<" "<<nachPrib;
                sbor=predSbor+kolkoSeProm*nachPrib;
                kolkoSeProm+=2;
                if(i!=n/2)
                {
                    nachPrib-=8;
                }
            }
            predSbor=sbor;
        }
    }*/
    cout<<sbor+(m-1)*n;
    return 0;
}
