#include #define rep(i,n) for(int i=0;i<(n);++i) #define all(a) (a).begin(),(a).end() #define dunk(a) cout << (a) << endl using namespace std; typedef long long ll; int main() { ios::sync_with_stdio(false); cin.tie(0); int r, c; cin >> r >> c; if (r != c) { if (r % 2 != 0 && c % 2 != 0) { ll ans = ((ll)r * c - 1) / 2ll + 1ll; dunk(ans - 1); } else { ll ans = ((ll)r * c) / 2; dunk(ans - 1); } } else { if (r % 2 != 0) { ll ans = ((ll)r * c - 1) / 4 + 1; dunk(ans - 1); } else { ll ans = ((ll)r * c) / 4; dunk(ans - 1); } } return 0; }