#include <bits/stdc++.h>
using std::swap;
unsigned char n, m;
int main() {
  scanf("%u%u", &n, &m);
  if (m > n) swap(n, m);
  if ((n % 3 == 1 && m % 4 == 0 && n > 1) ||
      (m % 3 == 1 && n % 4 == 0 && m > 1))
    printf("%u\n", n * m - (n * m / 4));
  else if (m == 1)
    printf("%u\n", n / 3 * 2 + (n % 3 > 1));
  else
    printf("%u\n%", n * m - (n * m / 4) - 1);
  return 0;
}
