#include <bits/stdc++.h>
int n, m;
int main() {
  scanf("%d %d", &n, &m);
  if (m > n) n ^= m ^= n ^= m;
  if (m == 1)
    printf("%d\n", n);
  else if (m == 2)
    printf("%d\n", 2 * (n / 4 * 2 + (n % 4 > 2 ? 2 : n % 4)));
  else
    printf("%d\n", (n * m + 1) / 2);
}
