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