#include <bits/stdc++.h>
using namespace std;
int n, m, f[50][100][100];
int cnt1(int n) {
  int cnt = 0;
  for (; n; n ^= n & -n) cnt++;
  return cnt;
}
int main() {
  scanf("%d%d", &n, &m);
  if (n < m) swap(n, m);
  memset(f, 0x3f, sizeof(f));
  int p2 = 1 << m;
  f[0][p2 - 1][0] = 0;
  int ans = 1 << 30;
  for (int i = 0; i <= n; i++)
    for (int j = 0; j < p2; j++)
      for (int k = 0; k < p2; k++) {
        for (int p = 0; p < p2; p++) {
          int s1 = j | k;
          s1 = s1 | (j >> 1);
          s1 = s1 | (j << 1);
          s1 = s1 & (p2 - 1);
          int s2 = j | k | p;
          s2 = s2 | (k << 1);
          s2 = s2 | (k >> 1);
          s2 = s2 & (p2 - 1);
          int s3 = k | p;
          s3 = s3 | (p >> 1);
          s3 = s3 | (p << 1);
          s3 = s3 & (p2 - 1);
          if (s2 != (p2 - 1)) continue;
          f[i + 1][k][p] = min(f[i][j][k] + cnt1(p), f[i + 1][k][p]);
          if (i == n) {
            int s4 = j | k;
            s4 = s4 | (k << 1);
            s4 = s4 | (k >> 1);
            s4 = s4 & (p2 - 1);
            if (s4 == p2 - 1) ans = min(ans, f[i][j][k]);
          }
        }
      }
  printf("%d\n", n * m - ans);
}
