#include<iostream>
using namespace std;
int main()
{   
    long long int n,m, num, razl;
    cin>>n>>m;
    if(n<3 || m<3)
    {
        num = n * m;
    }
    else
    {
        num = 2*m+(n-2)*2;
        razl= n*m-num;
        if(razl%2==0)
        {
            num = num + razl/2;
        }
        else
        {
            for(int i=0;i<razl;i++)
            {
                if(i%2!=0)
                {               
                    num=num+1;
                }
            }
        }
    }
    cout<<num<<endl;
}