#include using namespace std; using ll = long long; using ld = long double; #define print(x) cerr << #x << " = " << x << endl template ostream& operator<<(ostream &out, vector &cont) { out << "["; for (const auto &x : cont) out << x << ", "; out << "]"; return out; } int32_t main() { int n, m; cin >> n >> m; if(n%2 == 0 && m%2 == 0){ int ans = 0; int smallestBad = INT_MAX; for(int i=0; i> helper; if(i+j != 0 && !(i == n-1 && j == m-1) && (i+j)%2 == 1){ smallestBad = min(smallestBad, helper); } ans += helper; } } cout << ans - smallestBad << '\n'; } else{ int ans = 0; for(int i=0; i> helper; ans += helper; } cout << ans << '\n'; } }