#include <bits/stdc++.h>
using namespace std;
int main() {
  long long i, j, n, m, t;
  cin >> n >> m;
  t = min(n, m);
  m = max(n, m);
  n = t;
  if (n == 2) {
    if (m % 4 == 0)
      cout << m;
    else if (m % 4 == 2)
      cout << m + 2;
    else
      cout << m + 1;
    return 0;
  }
  if (m == 2 && n == 2) {
    cout << 4;
    return 0;
  }
  if (n == 2 && m >= n) {
    cout << m;
    return 0;
  }
  if (m == 2 && n >= m) {
    cout << n;
    return 0;
  }
  if (n == 1 || m == 1) {
    cout << max(n, m);
    return 0;
  }
  long long res1, res, res2;
  res1 = n / 2;
  if (n % 2 != 0) res1++;
  res2 = n - res1;
  res = res1 * (m / 2);
  res += res2 * (m / 2);
  if (m % 2 != 0) res += res1;
  if (res > (n * m) - res)
    cout << res;
  else
    cout << (n * m) - res;
}
