#include <bits/stdc++.h>
#define pb push_back
#define fi first
#define se second

using namespace std;

int n,m;

int main()
{
   cin >> n >> m;
   cout << 2*n + 2*m - 4 + ((n-2)/2)*((m-1)/2) + ((n-1)/2)*((m-2)/2) << "\n";
}