#include <iostream>

using namespace std;

int main()
{
    int n,m,x;
    cin>>n>>m;
    if (n>2 && m>2)
        x = (n*m) - (((n-2)*(m-2))+1)/2;
    else
        x = n*m;
    cout<<x;
    return 0;
}