#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, m;
  while (cin >> n >> m) {
    if (n > m) swap(n, m);
    if (n == 1) {
      cout << m << endl;
      continue;
    }
    if (n == 2) {
      int k = m / 4 * 4;
      if (m % 4 >= 1) k += 2;
      if (m % 4 >= 2) k += 2;
      cout << k << endl;
      continue;
    }
    cout << (n * m + 1) / 2 << endl;
  }
  return 0;
}
