#include <bits/stdc++.h>   using namespace std;   const int maxn = 1000000 + 10;   const int INF = 1e9 + 7;   const int MOD = 1e9 + 7;   const double eps = 1e-10;   const double pi = acos(-1);   int T, cases, n, m;   int main() {     ios::sync_with_stdio(false);     ;     cin >> n >> m;     int ans;     if (n == 1 || m == 1)       ans = n * m;     else if (n == 2 || m == 2) {       if (m == 2) swap(n, m);       if (m % 4 == 1)         ans = m / 4 * 4 + 2;       else         ans = (m + 3) / 4 * 4;     } else       ans = max((n * m) / 2, (n * m) - (n * m / 2));     cout << ans << endl;     return 0;   }   