#include <bits/stdc++.h>
using namespace std;
int H, W;
int D[43][1 << 6][1 << 6];
int bitCount[1 << 6];
int main() {
  cin >> H >> W;
  if (H < W) swap(H, W);
  assert(W <= H);
  assert(W <= 6);
  const int INF = 0x01010101;
  const int FULL = (1 << W) - 1;
  for (int x = 0; x <= FULL; x++)
    for (int sh = 0; sh < W; sh++) bitCount[x] += (x >> sh) & 1;
  memset(D, 1, sizeof(D));
  D[0][FULL][0] = 0;
  for (int i = 0; i < H; i++) {
    for (int u = 0; u <= FULL; u++)
      for (int ch = 0; ch <= FULL; ch++)
        if ((u | ch) == FULL) {
          for (int m = 0; m <= FULL; m++) {
            int val = D[i][u][m] + bitCount[ch];
            int mm = m | (ch) | (ch >> 1) | ((ch << 1) & FULL);
            D[i + 1][mm][ch] = min(D[i + 1][mm][ch], val);
          }
        }
  }
  int ans = *min_element(D[H][FULL], D[H][FULL] + FULL + 1);
  cout << H * W - ans << endl;
  return 0;
}
