#include <bits/stdc++.h>
using namespace std;
const int inf = 1e9;
int n, m, dp[44][1 << 7][1 << 7];
bool ok(int pm, int cm, int nm) {
  for (int j = 0; j < m; ++j) {
    if (((pm >> j) & 1) || ((cm >> j) & 1) || ((nm >> j) & 1)) continue;
    if (j > 0 && ((cm >> (j - 1)) & 1)) continue;
    if (j + 1 < m && ((cm >> (j + 1)) & 1)) continue;
    return 0;
  }
  return 1;
}
int main() {
  cin >> n >> m;
  if (m > n) swap(n, m);
  for (int i = 0; i <= n; ++i)
    for (int j = 0; j < (1 << m); ++j)
      for (int k = 0; k < (1 << m); ++k) dp[i][j][k] = inf;
  for (int nm = 0; nm < (1 << m); ++nm) dp[0][0][nm] = __builtin_popcount(nm);
  for (int i = 0; i < n; ++i) {
    for (int cm = 0; cm < (1 << m); ++cm)
      for (int nm = 0; nm < (1 << m); ++nm) {
        if (dp[i][cm][nm] == inf) continue;
        for (int nnm = 0; nnm < (1 << m); ++nnm) {
          if (ok(cm, nm, nnm))
            dp[i + 1][nm][nnm] = min(dp[i + 1][nm][nnm],
                                     dp[i][cm][nm] + __builtin_popcount(nnm));
        }
      }
  }
  int ans = inf;
  for (int j = 0; j < (1 << m); ++j) ans = min(ans, dp[n][j][0]);
  cout << n * m - ans << '\n';
}
