#include <bits/stdc++.h>
using namespace std;
int n, m, ans, a;
int main() {
  scanf("%d%d", &n, &m);
  for (int i = 0; i < n; ++i) ans += m + !(i & 1) >> 1;
  for (int i = 0; i < m; ++i) a += n + !(i & 1) >> 1;
  ans = max(ans, a);
  if (n == 2 || m == 2) {
    if (n != 2) swap(n, m);
    a = m & 0xffffc;
    a += min(2, m & 3) * 2;
    ans = max(ans, a);
  }
  ans = max(ans, max((1 + (n - 1) / 3) * m, (1 + (m - 1) / 3) * n));
  printf("%d\n", ans);
}
