#include <bits/stdc++.h>
using namespace std;
const int INF = 1e9 + 7;
const int maxn = 41;
const int sqrn = 7;
const int dx[5] = {-1, 0, 0, 0, 1};
const int dy[5] = {0, -1, 0, 1, 0};
int n, m;
vector<vector<vector<int> > > dp, usd;
int f(int x) { return x & ((1 << (m * 3)) - 1); }
int count(int x) {
  int ret = 0;
  for (int i = (2 * m); i < (3 * m); ++i) ret += (x >> i) & 1;
  return ret;
}
int calc(int x1234567890, int y1234567890, int x2345678901, int y2345678901) {
  return m * (x1234567890 - x2345678901 + 1) + (m - y2345678901 - 1);
}
int dfs(int x, int y, int msk) {
  if (~dp[x][y][msk]) return dp[x][y][msk];
  int &res = dp[x][y][msk];
  res = INF;
  if (x == n) {
    return res = count(msk);
  }
  if (y == m) {
    return (res = dfs(x + 1, 0, f(msk << m)) + count(msk));
  }
  for (int i = (0); i < (5); ++i) {
    int nx = x + dx[i], ny = y + dy[i];
    if (nx >= n || ny >= m || nx < 0 || ny < 0) continue;
    res = min(res, dfs(x, y + 1, msk | (1 << calc(x, y, nx, ny))));
  }
  return res;
}
int main() {
  scanf("%d%d", &n, &m);
  if (m > n) swap(n, m);
  dp.resize(n + 1);
  for (int i = (0); i <= (n); ++i) {
    dp[i].resize(m + 1);
    for (int j = (0); j <= (m); ++j) {
      dp[i][j].resize(1 << (m * 3));
      for (int msk = (0); msk < (1 << (m * 3)); ++msk) dp[i][j][msk] = -1;
    }
  }
  printf("%d\n", n * m - dfs(0, 0, 0));
  return 0;
}
