#include <iostream>
using namespace std;

int main()
{
    int a, b, c;
    cin >> a >> b;
    c = a * b - (a * b - (2 * a + 2 * (b - 2)) - ((a - 2) * (b - 2)) / 2);
    if(a > 1 && b > 1)
        cout << c;
    else if(a == 1 || b == 1)
        cout << a * b;
    return 0;
}