#include <bits/stdc++.h>
using namespace std;
int main() {
  int x, y;
  while (cin >> x >> y) {
    int row = x, col = y;
    if (x == 0 && y == 0) break;
    int r = 0;
    if (x > y) swap(x, y);
    if (x == 2) {
      if (y % 4 == 0)
        r = y;
      else if (y % 4 == 2)
        r = y + 2;
      else
        r = y + 1;
    } else if (x == 1)
      r = y;
    else
      r = (x * y + 1) / 2;
    printf("%d\n", r);
  }
  return 0;
}
