#include <bits/stdc++.h>
int main() {
  long long i, j, n, m, k;
  scanf("%lld%lld", &n, &m);
  if (n > m) {
    k = n;
    n = m;
    m = k;
  }
  if (n == 1) k = m;
  if (n == 2) {
    if (m % 4 == 0) {
      k = m;
    }
    if (m % 4 != 0) {
      if ((m % 4) % 2 == 1) k = m + 1;
      if ((m % 4) % 2 == 0) k = m + 2;
    }
  }
  if (n > 2) {
    if ((n % 2 == 1) && (m % 2 == 1))
      k = (n * m + 1) / 2;
    else
      k = n * m / 2;
  }
  printf("%lld\n", k);
  return 0;
}
