#include <bits/stdc++.h>
#pragma GCC optimize("Ofast")
#pragma GCC optimize("unroll-loops")
using namespace std;
int dp[(1 << (6))][(1 << (6))][51];
int cou[(1 << (6))];
signed main() {
  srand(1337);
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  int n, m;
  cin >> n >> m;
  if (n > m) swap(n, m);
  for (int mask = 0; mask < (1 << n); mask++) {
    int cy = 0;
    for (int i = 0; i < n; i++) cy += ((mask >> i) & 1);
    cou[mask] = cy;
  }
  for (int i = 0; i <= m; i++)
    for (int mask = 0; mask < (1 << n); mask++)
      for (int mask2 = 0; mask2 < (1 << n); mask2++) dp[mask][mask2][i] = 1e9;
  for (int mask = 0; mask < (1 << n); mask++) dp[0][mask][0] = cou[mask];
  vector<pair<pair<int, int>, int>> sd;
  for (int mask = 0; mask < (1 << n); mask++) {
    for (int mask2 = 0; mask2 < (1 << n); mask2++) {
      for (int mask3 = 0; mask3 < (1 << n); mask3++) {
        bool tr = true;
        for (int i = 0; i < n; i++) {
          bool te = ((mask2 >> i) & 1);
          if (i > 0) te = (te || ((mask2 >> (i - 1)) & 1));
          if (i < n - 1) te = (te || ((mask2 >> (i + 1)) & 1));
          te = (te || ((mask >> i) & 1));
          te = (te || ((mask3 >> i) & 1));
          tr = (tr && te);
        }
        if (tr) sd.push_back({{mask, mask2}, mask3});
      }
    }
  }
  for (int i = 1; i <= m; i++) {
    for (int j = 0; j < sd.size(); j++) {
      int a = sd[j].first.first;
      int b = sd[j].first.second;
      int c = sd[j].second;
      dp[b][c][i] = min(dp[b][c][i], dp[a][b][i - 1] + cou[c]);
    }
  }
  int yu = 1e9;
  for (int mask = 0; mask < (1 << n); mask++) yu = min(dp[mask][0][m], yu);
  cout << n * m - yu;
  return 0;
}
