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