#include <bits/stdc++.h>
using namespace std;
const int Maxn = 51;
int n, m;
vector<pair<int, int> > Can_mask[1 << 6];
int dp[Maxn][1 << 6][1 << 6];
void Trys(int i, int mask1, int mask2, int mask3) {
  if (i == m) {
    Can_mask[mask1].push_back({mask2, mask3});
    return;
  }
  Trys(i + 1, mask1 | 1 << i, mask2, mask3);
  if (i < m - 1) Trys(i + 1, mask1 | (1 << (i + 1)), mask2, mask3);
  if (i > 0) Trys(i + 1, mask1 | (1 << (i - 1)), mask2, mask3);
  Trys(i + 1, mask1, mask2 | (1 << i), mask3);
  Trys(i + 1, mask1, mask2, mask3 | (1 << i));
  return;
}
int d__p(int i, int Pre_mask, int cur_Mask) {
  int &res = dp[i][Pre_mask][cur_Mask];
  if (res != -1) return res;
  if (i > n) return 0;
  res = 1e9;
  for (int Mask = 0; Mask < 1 << m; Mask++) {
    for (auto Submask : Can_mask[Mask]) {
      if (i == 1 && Submask.first) continue;
      if (i == n && Submask.second) continue;
      int val1 = __builtin_popcount(Mask | cur_Mask);
      int val2 = 0;
      for (int j = 0; j < m; j++) {
        if ((Submask.first & (1 << j)) && !(Pre_mask & (1 << j))) val2++;
      }
      res =
          min(res, d__p(i + 1, Mask | cur_Mask, Submask.second) + val1 + val2);
    }
  }
  return res;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cin >> n >> m;
  if (n < m) swap(n, m);
  Trys(0, 0, 0, 0);
  memset(dp, -1, sizeof dp);
  cout << n * m - d__p(1, 0, 0);
  return 0;
}
