#include <bits/stdc++.h>
using namespace std;
int n, m, s, bit[70], dp[45][70][70], ret;
int main() {
  scanf("%d%d", &n, &m);
  if (m > n) swap(n, m);
  s = (1 << m) - 1;
  for (int i = 0; i <= s; i++) {
    for (int j = i; j; j -= j & -j) bit[i]++;
  }
  memset(dp, 63, sizeof(dp));
  ret = (1 << 30);
  dp[0][0][0] = 0;
  for (int i = 0; i < n; i++) {
    for (int p2 = 0; p2 <= s; p2++) {
      for (int p1 = 0; p1 <= s; p1++) {
        for (int j = 0; j <= s; j++) {
          if (i && ((p1 | p2 | (p2 >> 1) | (p2 << 1) | j) & s) != s) continue;
          dp[i + 1][p2][j] = min(dp[i + 1][p2][j], dp[i][p1][p2] + bit[j]);
          if (i == n - 1 && ((p2 | j | (j << 1) | (j >> 1)) & s) == s)
            ret = min(ret, dp[i + 1][p2][j]);
        }
      }
    }
  }
  printf("%d\n", n * m - ret);
  return 0;
}
