#include <bits/stdc++.h>
using namespace std;
int f(int x, int m) {
  int z = ((x << 1) | x | (x >> 1));
  z = (z & ((1 << m) - 1));
  return z;
}
int bits(int x, int m) {
  int r = 0;
  for (int i = 0; i < m; i++) {
    if (x & (1 << i)) r++;
  }
  return r;
}
int dp[42][64][64];
int main() {
  int n, m;
  cin >> n >> m;
  if (n < m) swap(n, m);
  int INF = 1e9;
  for (int i = 0; i <= n; i++) {
    for (int j = 0; j < (1 << m); j++) {
      for (int p = 0; p < (1 << m); p++) dp[i][j][p] = INF;
    }
  }
  dp[0][0][0] = 0;
  for (int i = 1; i <= n; i++) {
    for (int j = 0; j < (1 << m); j++) {
      for (int k = 0; k < (1 << m); k++) {
        for (int p = 0; p < (1 << m); p++) {
          if (i == 1 || (j | f(k, m) | p) == (1 << m) - 1) {
            dp[i][k][p] = min(dp[i][k][p], dp[i - 1][j][k] + bits(p, m));
          }
        }
      }
    }
  }
  int ans = INF;
  for (int k = 0; k < (1 << m); k++) {
    for (int p = 0; p < (1 << m); p++) {
      if ((k | f(p, m)) == (1 << m) - 1) {
        if (ans > dp[n][k][p]) ans = dp[n][k][p];
      }
    }
  }
  cout << n * m - ans << endl;
}
