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