#include <bits/stdc++.h>

using namespace std;

int main()
{
    int a,b;
    cin>>a>>b;
    if(a==1 || b==1)
        cout<<max(a,b);
    else if(a%2==1 && b%2==1)
        cout<<a+b+(a*b-5)/2;
    else
        cout<<a+b-2+a*b/2;
    return 0;
}