#include <bits/stdc++.h>
using namespace std;
int n, m;
int memo[(1 << 6)][(1 << 6)][42];
int pre[(1 << 6)];
int solve(int covered, int has, int idx) {
  if (idx == m) return (covered != (1 << n) - 1) * 1e9;
  int &ret = memo[covered][has][idx];
  if (~ret) return ret;
  ret = 1e9;
  for (int mask = 0; mask < (1 << n); ++mask) {
    if ((mask | covered) != (1 << n) - 1) continue;
    ret = min(ret,
              solve(pre[mask] | has, mask, idx + 1) + __builtin_popcount(mask));
  }
  return ret;
}
int main() {
  cin >> n >> m;
  if (n > m) swap(n, m);
  for (int mask = 0; mask < (1 << n); ++mask) {
    pre[mask] = mask;
    for (int i = 0; i < n; ++i) {
      if (i && (mask & (1 << (i - 1)))) pre[mask] |= (1 << i);
      if (i + 1 < n && (mask & (1 << (i + 1)))) pre[mask] |= (1 << i);
    }
  }
  memset(memo, -1, sizeof memo);
  cout << n * m - solve((1 << n) - 1, 0, 0);
}
