#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, m;
  while (scanf("%d%d", &n, &m) != EOF) {
    if (n > m) {
      int t = m;
      m = n;
      n = t;
    }
    if (n == 1)
      cout << m << endl;
    else if (n == 2) {
      int t = m % 4, ans = 0;
      if (t > 2)
        ans += 4;
      else
        ans += t * 2;
      cout << m / 4 * 4 + ans << endl;
    } else {
      cout << (n * m + 1) / 2 << endl;
    }
  }
}
