#include <bits/stdc++.h>
using namespace std;
const int mn = 6, mm = 41;
int mem[1 << mn][1 << mn][mm][mn + 1];
int m, n;
int go(int last, int cur, int i, int j) {
  if (i == m) return 0;
  int& ret = mem[last][cur][i][j];
  if (ret != -1) return ret;
  if (j == n) return ret = go(cur, last, i + 1, 0);
  if ((((cur) >> (j)) & 1) || (j > 0 && (((cur) >> (j - 1)) & 1)) ||
      (j < n - 1 && (((cur) >> (j + 1)) & 1)) ||
      (i > 0 && (((last) >> (j)) & 1))) {
    last &= (~(1 << j));
    return ret = go(last, cur, i, j + 1);
  }
  ret = (int)1e9;
  if (j > 0) ret = min(ret, go(last, cur | (1 << (j - 1)), i, j + 1) + 1);
  ret = min(ret, go(last, cur | (1 << (j)), i, j + 1) + 1);
  if (j < n - 1) ret = min(ret, go(last, cur | (1 << (j + 1)), i, j + 1) + 1);
  if (i < m - 1) ret = min(ret, go(last | (1 << j), cur, i, j + 1) + 1);
  return ret;
}
int main() {
  m = ({
    int t;
    scanf("%d", &t);
    t;
  }),
  n = ({
    int t;
    scanf("%d", &t);
    t;
  });
  if (m < n) swap(m, n);
  memset(mem, -1, sizeof(mem));
  cout << m * n - go(0, 0, 0, 0) << endl;
  return 0;
}
