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