#include <bits/stdc++.h>
using namespace std;
const int maxn = (1 << 6) + 10;
int dp[42][maxn][maxn];
;
int n, m;
int main() {
  scanf("%d%d", &n, &m);
  if (n < m) swap(n, m);
  int Max = (1 << m) - 1;
  memset(dp, 0x3f3f3f3f, sizeof(dp));
  int ans = 0x3f3f3f3f;
  for (int i = 0; i <= Max; i++) dp[1][i][0] = __builtin_popcount(i);
  for (int i = 1; i < n; i++)
    for (int j = 0; j <= Max; j++)
      for (int k = 0; k <= Max; k++) {
        if (dp[i][k][j] >= 0x3f3f3f3f) continue;
        for (int s = 0; s <= Max; s++)
          if (((k | (k << 1) | (k >> 1) | j | s) & Max) == Max)
            dp[i + 1][s][k] =
                min(dp[i + 1][s][k], dp[i][k][j] + __builtin_popcount(s));
      }
  for (int i = 0; i <= Max; i++)
    for (int j = 0; j <= Max; j++)
      if (((j | (j << 1) | (j >> 1) | i) & Max) == Max)
        ans = min(ans, dp[n][j][i]);
  printf("%d\n", n * m - ans);
}
