#include <iostream>

using namespace std;

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