#include <iostream>

using namespace std;

int main()
{
    double dub, n ,m;
    int t, k;
    cin >> n >> m;
    k = n * m;
    if((n <= 2) || (m <= 2)){
        cout << k << endl;
    }
    else{
        dub = (m - 2) * (n - 2) / 2;
        t = dub + 0.5;
        cout << k - t << endl;
    }
    return 0;
}