#include<iostream>

using namespace std;
unsigned long long brojSahovskih(unsigned long long x,unsigned long long y){
    if(x%2==0)return x/2*y;
    else{
        unsigned long long px=2+(x-2)/2;
        unsigned long long py=2+(y-2)/2;
        return px*py+(x-px)*(y-py);
    }
}

int main(){
ios_base::sync_with_stdio(false);
cin.tie(NULL);
unsigned long long n,m;
cin>>n>>m;
cout<<n*m-brojSahovskih(n-2,m-2);
return 0;
}