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