#include <bits/stdc++.h>

using namespace std;

int main()
{
    unsigned long long int n, m;
    cin >> n >> m;
    
    cout << 2 * (n + m - 2) + ((n - 2) / 2) * ((m - 1) / 2) + ((n - 1) / 2) * ((m - 2) / 2);
    return 0;
}