#include <bits/stdc++.h>
#pragma comment(linker, "/STACK:167772160")
using namespace std;
int main() {
  int n, m;
  scanf("%d%d", &n, &m);
  if (n == 1 || m == 1) {
    printf("%d\n", n * m);
    return 0;
  }
  if (n == 2 && m == 2) {
    printf("%d\n", n * m);
    return 0;
  }
  if (n > m) swap(n, m);
  if (n == 2) {
    int k = m / 4;
    int kk = min(2, m & 3);
    int x = k * 4 + kk * 2;
    printf("%d\n", max((n * m + 1) / 2, x));
    return 0;
  }
  printf("%d\n", (n * m + 1) / 2);
  return 0;
}
