#include <iostream>

using namespace std;

int main()
{
    long long a, b; cin >> a >> b;
    long long x=a-2; long long y=b-2;
    if(a==1 and b==1) cout << 1<< endl ; 
    else if(a==1 and b!=1) cout << b<< endl ;
    else if(a!=1 and b==1) cout << a<< endl ; 
    else if(a%2!=0 and b%2!=0) cout << a*b - (  (x/2+1)*(y/2+1) + (x/2)*(y/2)) << endl ; //nepar nepar
    else if(a%2!=0 and b%2==0) cout << a*b - ( (x/2+1)*(y/2) + (x/2)*(y/2) )<< endl ; // nepar par
    else if(a%2==0 and b%2!=0) cout << a*b - ( (x/2)*(y/2+1) + (x/2)*(y/2) )<< endl ; // par nepar
    else if(a%2==0 and b%2==0) cout << a*b -( (x/2)*(y/2) + (x/2)*(y/2) )<< endl ; // par par

    
    return 0;  
}