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