#include <bits/stdc++.h>
using namespace std;
const int INF = 0x7fffffff;
const int MAXN = +3;
int f[50][100][100], bin[100];
int n, m, tp, proc, nxt;
void init() {
  cin >> n >> m;
  if (n < m) swap(n, m);
  memset(f, 1, sizeof(f));
  tp = (1 << m);
  f[1][0][0] = 0;
  for (int i = 1; i <= (int)(99); i++) {
    bin[i] = bin[i & (i - 1)] + 1;
  }
}
int main() {
  init();
  for (int i = 1; i <= (int)(n); i++) {
    for (int ur = 0; ur < (int)(tp); ur++) {
      for (int nr = 0; nr < (int)(tp); nr++) {
        if (f[i][ur][nr] > 1e5) continue;
        for (int t = 0; t < (int)(tp); t++) {
          if (i == 1 || (ur | t) == tp - 1) {
            proc = (nr | t | (t << 1) | (t >> 1)) & (tp - 1);
            nxt = bin[t] + f[i][ur][nr];
            f[i + 1][proc][t] = min(f[i + 1][proc][t], nxt);
          }
        }
      }
    }
  }
  int ans = INF;
  for (int i = 0; i < (int)(tp); i++) {
    ans = min(ans, f[n + 1][tp - 1][i]);
  }
  cout << n * m - ans;
  return 0;
}
