#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, m;
  cin >> n >> m;
  if (n == 1 || m == 1) {
    cout << max(n, m) << endl;
  } else if (min(n, m) == 2) {
    n = max(n, m);
    if (n % 4 == 0)
      cout << n << endl;
    else {
      int t = n / 4 * 4;
      int r = n % 4;
      if (r == 1)
        t += 2;
      else
        t += 4;
      cout << t << endl;
    }
  } else {
    cout << n * m / 2 + ((n * m) & 1) << endl;
  }
  return 0;
}
