#include <bits/stdc++.h>
using namespace std;
int main() {
  int a, b;
  int ans;
  scanf("%d%d", &a, &b);
  ans = (a * b + 1) / 2;
  if (a > ans) ans = a;
  if (b > ans) ans = b;
  if (a >= 2 && b >= 2) {
    int t = (max(a, b) / 4) * 4;
    if (max(a, b) % 4 == 1) {
      t += 2;
    }
    if (max(a, b) % 4 > 1) {
      t += 4;
    }
    if (t > ans) ans = t;
  }
  printf("%d\n", ans);
  return 0;
}
