#include <iostream>

using namespace std;

int main()
{   ios_base::sync_with_stdio(false);
    cin.tie(NULL);
    cout.tie(NULL); 
    int n,m,k,k1;
    cin>>n>>m;
    k=n*m;
    n-=2;
    m-=2;
    k1=((n*m)/2)+1;
    if(k%2==0){
        k1--;
    }
    k-=k1;
    cout<<k;

    return 0;
}