#include <iostream>

using namespace std;
int main ()
{
    long long n, m;
    cin >> n >> m;
    long long proizvod=n*m;
    if (n==1)
        cout << m << endl;
    if (m==1 && n!=1)
        cout << n << endl;
    if (n!=1 && m!=1)
    {
       cout << proizvod/2+m+n-2 << endl;
    }
    return 0;

}