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