#include <bits/stdc++.h>
#pragma comment(linker, "/STACK:16777216")
using namespace std;
int n, m, res;
int main() {
  cin >> n >> m;
  if (min(n, m) == 1)
    cout << max(n, m) << endl;
  else {
    res = ((m + 1) / 2) * ((n + 1) / 2) + (m / 2) * (n / 2);
    res = max(res, ((m + 1) / 2) * (n / 2) + (m / 2) * ((n + 1) / 2));
    swap(n, m);
    res = max(res, ((m + 1) / 2) * ((n + 1) / 2) + (m / 2) * (n / 2));
    res = max(res, ((m + 1) / 2) * (n / 2) + (m / 2) * ((n + 1) / 2));
    if (min(n, m) == 2) {
      if (n != 2) swap(n, m);
      int cur = (m / 4) * 4;
      if (m % 4 == 1)
        cur += 2;
      else if (m % 4 >= 2)
        cur += 4;
      res = max(res, cur);
    }
    cout << res << endl;
  }
  return 0;
}
