#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, m, x1, x2;
  cin >> n >> m;
  if (n == 1)
    cout << m << endl;
  else {
    if (m == 1)
      cout << n << endl;
    else {
      if (n == 2) {
        if ((m % 4) == 3) m -= 1;
        if ((m % 4) == 0) m -= 2;
        x1 = 4 * ((m / 4) + 1);
        x2 = (2 * ((m % 4) % 2));
        cout << x1 - x2 << endl;
      } else {
        if (m == 2) {
          if ((n % 4) == 3) n -= 1;
          if ((n % 4) == 0) n -= 2;
          cout << (4 * ((n / 4) + 1)) - (2 * ((n % 4) % 2)) << endl;
        } else {
          if ((n * m) % 2 == 1)
            cout << ((n * m) / 2) + 1 << endl;
          else
            cout << (n * m) / 2 << endl;
        }
      }
    }
  }
}
