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