#include <bits/stdc++.h>

using namespace std;

int main()
{
    long long n,m;
    cin>>n>>m;
    long long s=0;
    long long k=0;
    s+=n*m-2*m-2*(n-2);
    if(s%2==0)
        s/=2;
    else s=(s+1)/2;
    k=n*m-s;
    cout<<k<<endl;

    return 0;
}