#include <bits/stdc++.h>
using namespace std;
static const double EPS = 1e-8;
inline int popcount(unsigned long long x) {
  x = (x & 0x5555555555555555ULL) + ((x >> 1) & 0x5555555555555555ULL);
  x = (x & 0x3333333333333333ULL) + ((x >> 2) & 0x3333333333333333ULL);
  x = (x & 0x0f0f0f0f0f0f0f0fULL) + ((x >> 4) & 0x0f0f0f0f0f0f0f0fULL);
  x = (x & 0x00ff00ff00ff00ffULL) + ((x >> 8) & 0x00ff00ff00ff00ffULL);
  x = (x & 0x0000ffff0000ffffULL) + ((x >> 16) & 0x0000ffff0000ffffULL);
  return (x & 0x00000000ffffffffULL) + ((x >> 32) & 0x00000000ffffffffULL);
}
inline int dir(int mask, int idx) {
  return (mask >> (idx * 2)) & ((1 << 0) | (1 << 1));
}
int main() {
  istream &fin = cin;
  ostream &fout = cout;
  FILE *fpin = stdin;
  FILE *fpout = stdout;
  int n, m;
  fin >> n >> m;
  if (n < m) swap(n, m);
  int dp[42][1 << 6][1 << 6];
  memset(dp, 60, sizeof(dp));
  dp[0][0][0] = 0;
  for (int r = 0; r < n; r++) {
    for (int pmask = 0; pmask < (1 << m); pmask++) {
      for (int cmask = 0; cmask < (1 << m); cmask++) {
        if (dp[r][pmask][cmask] >= 1000000000) continue;
        for (int movemask = 0; movemask < (1 << (m * 2)); movemask++) {
          if (dir(movemask, 0) == 0) continue;
          if (dir(movemask, m - 1) == 2) continue;
          int npmask = cmask;
          int ncmask = 0;
          for (int i = 0; i < m; i++) {
            if (pmask & (1 << i)) continue;
            if (cmask & (1 << i)) continue;
            if ((cmask << 1) & (1 << i)) continue;
            if ((cmask >> 1) & (1 << i)) continue;
            if (dir(movemask, i) == 0) npmask |= (1 << (i - 1));
            if (dir(movemask, i) == 1) npmask |= (1 << i);
            if (dir(movemask, i) == 2) npmask |= (1 << (i + 1));
            if (dir(movemask, i) == 3) ncmask |= (1 << i);
          }
          dp[r + 1][npmask][ncmask] =
              min(dp[r + 1][npmask][ncmask],
                  dp[r][pmask][cmask] + popcount(npmask));
        }
      }
    }
  }
  int res = 1000000000;
  for (int i = 0; i < (1 << m); i++) {
    res = min(res, dp[n][i][0]);
  }
  fout << n * m - res << endl;
}
