#include <iostream>

using namespace std;

int main()
{
    long long n, m;
    cin >> n >> m;
    if (min(n, m) == 1)
        cout << max(n, m) << endl;
    else
        cout << (n*m + 2*n + 2*m - 4) / 2 << endl;
    return 0;
}