#include <bits/stdc++.h>
using namespace std;
int main() {
  int a, b;
  cin >> a >> b;
  int ans = 0;
  long long c, d, e;
  c = a * (((b - 1) / 3) + 1);
  d = b * (((a - 1) / 3) + 1);
  ans = max(c, d);
  if (a <= 3) {
    if (a == 1) {
      int temp = b / 2;
      int t = b % 2;
      int ta = ((temp + 1) / 2) * 2;
      if (t == 1 && temp % 2 == 0) ta++;
      ans = max(ans, ta);
    } else {
      int temp = b / 2;
      int t = b % 2;
      int ta = ((temp + 1) / 2) * 4;
      if (t == 1 && temp % 2 == 0) ta += a;
      ans = max(ans, ta);
    }
  }
  if (b <= 3) {
    if (b == 1) {
      int temp = a / 2;
      int t = a % 2;
      int ta = ((temp + 1) / 2) * 2;
      if (t == 1 && temp % 2 == 0) ta++;
      ans = max(ans, ta);
    } else {
      int temp = a / 2;
      int t = a % 2;
      int ta = ((temp + 1) / 2) * 4;
      if (t == 1 && temp % 2 == 0) ta += b;
      ans = max(ans, ta);
    }
  }
  int t = a * b;
  if (t % 2 == 1)
    ans = max(ans, (t + 1) / 2);
  else
    ans = max(ans, t / 2);
  cout << ans << endl;
  return 0;
}
