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