#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 (n == 2 || m == 2) {
    if (m == 2) {
      int a = (n / 4) * 2;
      if (n % 4 >= 1) a++;
      if (n % 4 >= 2) a++;
      cout << 2 * a << endl;
    } else {
      int a = (m / 4) * 2;
      if (m % 4 >= 1) a++;
      if (m % 4 >= 2) a++;
      cout << 2 * a << endl;
    }
  } else {
    cout << (n * m + 1) / 2 << endl;
  }
  return 0;
}
