#include <bits/stdc++.h>
using namespace std;
const int INF = 123456789;
int n, m, msk, ans = INF;
int dp[45][100][100];
int ct[100];
inline void chmin(int &a, int b) { a = min(a, b); }
int main() {
  scanf("%d%d", &n, &m);
  if (n < m) swap(n, m);
  msk = (1 << m) - 1;
  ct[1] = 1;
  for (int i = 1; i <= n; i++)
    for (int j = 0; j <= msk; j++)
      for (int k = 0; k <= msk; k++) dp[i][j][k] = INF;
  for (int i = 2; i <= msk; i++) ct[i] = ct[i / 2] + i % 2;
  for (int i = 0; i <= msk; i++)
    dp[1][i][((i >> 1) | i | (i << 1)) & msk] = ct[i];
  for (int i = 1; i < n; i++)
    for (int j = 0; j <= msk; j++)
      for (int k = 0; k <= msk; k++)
        if (dp[i][j][k] != INF)
          for (int l = 0; l <= msk; l++)
            if ((l | k) == msk)
              chmin(dp[i + 1][l][((l >> 1) | l | (l << 1) | j) & msk],
                    dp[i][j][k] + ct[l]);
  for (int i = 0; i <= msk; i++) ans = min(ans, dp[n][i][msk]);
  printf("%d\n", n * m - ans);
  return 0;
}
