#include<iostream>

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

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