#include<bits/stdc++.h>
using namespace std;
short n,p;
long long m;
int main(){
ios_base::sync_with_stdio(false);
 cin.tie(NULL);
cin>>m>>n>>p;
int s=(n*(n+1))/2;
int p=s;
int f=n-1;
int h=n*3+1;
for(short i; i<p; i++){
    if(i<n/2){
    s= p+ f *h;
    f-=2;
    h-=8;
    }else{
        h--;
    s=p+1+f*h;
    f=f+2;
    if(i==n/2+1){
        h-=8;
    }
    }


}
p=s;

cout<<s+(m-1)*n;
    return 0;
}
