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