#include <bits/stdc++.h>
using namespace std;
const int INF = 0x3f3f3f3f;
int dir[5][2] = {0, 1, 1, 0, 1, 1, 1, 2, 2, 1};
int n, m;
map<pair<pair<int, int>, int>, int> all;
int dfs(int x, int y, int mask) {
  if (y == m) x++, y = 0;
  if (x == n) return 0;
  pair<pair<int, int>, int> p = make_pair(make_pair(x, y), mask);
  if (all.count(p)) return all[p];
  int &res = all[p] = INF;
  if (mask & 1) res = dfs(x, y + 1, mask >> 1);
  for (int j = 0; j < 3; j++) {
    for (int k = 0; k < 3; k++) {
      int nmask = mask;
      for (int i = 0; i < 5; i++) {
        int xx = dir[i][0] - j, yy = dir[i][1] - k;
        if (xx >= 0 && yy >= 0 && x + xx < n && y + yy < m)
          nmask |= 1 << xx * m + yy;
      }
      if (nmask & 1) res = min(res, dfs(x, y + 1, nmask >> 1) + 1);
    }
  }
  return res;
}
int main() {
  scanf("%d%d", &n, &m);
  if (m > n) swap(n, m);
  printf("%d\n", n * m - dfs(0, 0, 0));
  return 0;
}
