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