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