#include <bits/stdc++.h>
using namespace std;
const int va = 45;
int n, m, cnt[1 << 7], f[va][1 << 7][1 << 7], ans = 0x3f3f3f3f;
int main() {
  scanf("%d%d", &n, &m);
  if (n < m) swap(n, m);
  memset(f, 0x3f3f3f3f, sizeof(f));
  for (int i = 0; i <= (1 << m) - 1; i++) {
    int cc = 0;
    int j = i;
    while (j != 0) {
      if (j & 1) cc++;
      j >>= 1;
    }
    cnt[i] = cc;
  }
  int ma = (1 << m) - 1;
  for (int i = 0; i <= ma; i++) f[0][0][i] = 0;
  for (int i = 1; i <= n; i++) {
    for (int t = 0; t <= ma; t++)
      for (int j = 0; j <= ma; j++)
        for (int k = 0; k <= ma; k++) {
          if (((t | j | k | (j << 1) | (j >> 1)) & ma) == ma) {
            f[i][j][k] = min(f[i][j][k], f[i - 1][t][j] + cnt[j]);
          }
        }
  }
  for (int i = 0; i <= ma; i++) ans = min(ans, f[n][i][0]);
  printf("%d", n * m - ans);
  return 0;
}
