#include <bits/stdc++.h>
using namespace std;
inline int read() {
  int x = 0, f = 1;
  char ch = getchar();
  for (; ch < '0' || ch > '9'; ch = getchar())
    if (ch == '-') f = -1;
  for (; ch >= '0' && ch <= '9'; ch = getchar()) x = x * 10 + ch - '0';
  return x * f;
}
int n, m;
int dp[45][1 << 7][1 << 7];
int cnt[1 << 7];
void init() {
  for (int i = 0; i < (1 << m); i++) {
    for (int x = i; x; x >>= 1)
      if ((x & 1)) cnt[i]++;
    cnt[i] = m - cnt[i];
  }
}
bool ok(int j, int k, int l) {
  int state = k | (k << 1) | (k >> 1) | j | l;
  return (state & ((1 << m) - 1)) == ((1 << m) - 1);
}
int main() {
  n = read(), m = read();
  if (n < m) swap(n, m);
  init();
  memset(dp, -0x3f3f3f3f, sizeof dp);
  for (int i = 0; i < (1 << m); i++) dp[0][0][i] = 0;
  for (int i = 0; i < n; i++)
    for (int j = 0; j < (1 << m); j++)
      for (int k = 0; k < (1 << m); k++)
        if (dp[i][j][k] >= 0)
          for (int l = 0; l < (1 << m); l++)
            if (ok(j, k, l))
              dp[i + 1][k][l] = max(dp[i + 1][k][l], dp[i][j][k] + cnt[k]);
  int ans = 0;
  for (int i = 0; i < (1 << m); i++) ans = max(ans, dp[n][i][0]);
  printf("%d\n", ans);
  return 0;
}
