#include <algorithm> #include <climits> #include <cstdlib> #include <vector> #include <cctype> #include <deque> #include <cmath> #include <queue> #include <map> #include <set> #include <ctime> #include <stack> #include <cstdio> #include <string> #include <iomanip> #include <cstring> #include <iostream> #include <functional> using namespace std; typedef long long ll; #define LLMAX LLONG_MAX #define IMAX INT_MAX int main() { ll r, c; cin >> r >> c; if (r != c) { if ((r*c)%2) { cout << r*(c/2)+(r+1)/2-1 << endl; }else { cout << (r*c)/2-1 << endl; } }else { if (r%2) { cout << 1+r*(r-1)-1 << endl; }else { cout << r*r-1 << endl; } } }