#include <bits/stdc++.h>
using namespace std;
const double pi = acos(-1.0);
int n, m;
int d[45][1 << 6][1 << 6];
template <class T>
inline int bitcnt(T n) {
  int res = 0;
  for (; n != 0; n &= n - 1) res++;
  return res;
}
int main() {
  scanf("%d%d", &n, &m);
  if (n < m) swap(n, m);
  memset(d, 63, sizeof d);
  ;
  d[0][0][0] = 0;
  int full = (1 << m) - 1;
  for (int s = 0, _n = (n); s < _n; s++) {
    for (int m1 = 0, _n = (1 << m); m1 < _n; m1++)
      for (int m2 = 0, _n = (1 << m); m2 < _n; m2++) {
        for (int j = 0, _n = (m); j < _n; j++) {
          int t1 = m1 | (1 << j);
          int t2 = m2 | (1 << j);
          if (j > 0) t1 |= (1 << (j - 1));
          if (j < m - 1) t1 |= (1 << (j + 1));
          d[s][t1][t2] = min(d[s][t1][t2], d[s][m1][m2] + 1);
        }
      }
    for (int m1 = 0, _n = (1 << m); m1 < _n; m1++)
      for (int m2 = 0, _n = (1 << m); m2 < _n; m2++) {
        int need = full - m1;
        int &q = d[s + 1][(m2 | need | (need >> 1) | (need << 1)) & full][need];
        q = min(q, d[s][m1][m2] + bitcnt(need));
      }
  }
  int res = 0x7fffffff;
  for (int m2 = 0, _n = (1 << m); m2 < _n; m2++)
    res = min(res, d[n - 1][full][m2]);
  if (n > 1) res = min(res, d[n - 2][full][full]);
  printf("%d\n", n * m - res);
  return 0;
}
