#include <bits/stdc++.h>
using namespace std;
const int inf = 1000000000;
int a[40][1 << 6][1 << 6];
inline bool all_colored(int mask1, int mask2, int mask3, int m) {
  int mask = (1 << m) - 1;
  return ((mask2 | (mask2 << 1) | (mask2 >> 1) | mask1 | mask3) & mask) == mask;
}
inline int bitcnt(int x) {
  int cnt = 0;
  while (x) {
    if (x & 1) cnt++;
    x >>= 1;
  }
  return cnt;
}
int main() {
  int m, n;
  scanf("%d%d", &m, &n);
  if (m > n) swap(m, n);
  int mm = 1 << m;
  for (int i = 0; i < n; i++)
    for (int m1 = 0; m1 < mm; m1++)
      for (int m2 = 0; m2 < mm; m2++) {
        a[i][m1][m2] = inf;
      }
  for (int mask = 0; mask < mm; mask++) {
    a[0][0][mask] = bitcnt(mask);
  }
  for (int i = 0; i < n - 1; i++)
    for (int m1 = 0; m1 < mm; m1++)
      for (int m2 = 0; m2 < mm; m2++)
        for (int m3 = 0; m3 < mm; m3++) {
          if (all_colored(m1, m2, m3, m))
            a[i + 1][m2][m3] = min(a[i + 1][m2][m3], a[i][m1][m2] + bitcnt(m3));
        }
  int res = inf;
  for (int m1 = 0; m1 < mm; m1++)
    for (int m2 = 0; m2 < mm; m2++) {
      if (all_colored(m1, m2, 0, m)) res = min(res, a[n - 1][m1][m2]);
    }
  printf("%d\n", m * n - res);
  return 0;
}
