#include <bits/stdc++.h>
#pragma comment(linker, "/STACK:66777216")
using namespace std;
int a, b, c, d, i, j, n, m, k;
vector<int> sm[500001];
bool used[500001];
int lp[500001], q[1000001];
const int di[] = {-2, -2, -1, -1, 1, 1, 2, 2};
const int dj[] = {-1, 1, -2, 2, -2, 2, -1, 1};
bool dfs(int v) {
  if (used[v]) return 0;
  used[v] = 1;
  for (int _n(((int)((sm[v]).size())) - 1), i(0); i <= _n; i++) {
    if (q[sm[v][i]] == -1 || dfs(q[sm[v][i]])) {
      lp[v] = sm[v][i];
      q[sm[v][i]] = v;
      return 1;
    }
  }
  return 0;
}
int main() {
  scanf("%d%d", &n, &m);
  for (int _n((n)-1), i(0); i <= _n; i++) {
    for (int _n((m)-1), j(0); j <= _n; j++) {
      if ((i + j) % 2) continue;
      for (int _n((8) - 1), z(0); z <= _n; z++) {
        int ni = i + di[z];
        int nj = j + dj[z];
        if (ni < 0 || ni >= n || nj < 0 || nj >= m) continue;
        sm[k].push_back(ni * m + nj);
      }
      ++k;
    }
  }
  memset(lp, -1, sizeof(lp));
  memset(q, -1, sizeof(q));
  int ans = 0, old = -1;
  while (ans != old) {
    old = ans;
    memset((used), 0, sizeof(used));
    for (int _n((k)-1), i(0); i <= _n; i++)
      if (lp[i] == -1 && dfs(i)) ++ans;
  }
  printf("%d\n", n * m - ans);
}
