#include <bits/stdc++.h>
using namespace std;
const int MN = 41;
const int MSK = (1 << 7) + 10;
const int INF = 1e9 + 10;
int n, m;
int dp[MN][MSK][MSK];
void solve() {
  for (int i = 1; i < m; ++i)
    for (int msk1 = 0; msk1 < (1 << n); ++msk1)
      for (int msk2 = 0; msk2 < (1 << n); ++msk2) {
        for (int t = 0; t < (1 << n); ++t) {
          int t1 = t | msk2;
          if (__builtin_popcount(t1) != n) continue;
          t1 = (t) | (t * 2) | (t / 2);
          t1 &= (1 << n) - 1;
          t1 |= msk1;
          dp[i + 1][msk1][msk2] = min(dp[i + 1][msk1][msk2],
                                      dp[i][t][t1] + __builtin_popcount(msk1));
        }
      }
}
void prep() {
  if (n > m) swap(n, m);
  for (int i = 1; i <= m; ++i)
    for (int j = 0; j < (1 << n); ++j)
      for (int k = 0; k < (1 << n); ++k) dp[i][j][k] = INF;
  for (int i = 0; i < (1 << n); ++i)
    for (int j = 0; j < (1 << n); ++j) {
      if (__builtin_popcount(j) == n)
        dp[1][i][j] = __builtin_popcount(i);
      else
        dp[1][i][j] = INF;
    }
}
int main() {
  cin >> n >> m;
  prep();
  solve();
  int mn = INF;
  for (int i = 0; i < (1 << n); ++i) {
    int t = (i * 2) | (i / 2) | i;
    t &= (1 << n) - 1;
    mn = min(mn, dp[m][i][t]);
  }
  cout << n * m - mn << endl;
  return 0;
}
