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