#include <bits/stdc++.h>
using namespace std;
int n, m;
int f[42][730], p3[8];
inline int GetBit(int st, int pos) { return (st % p3[pos + 1]) / p3[pos]; }
int dfs(int i, int j, const int lst, int ev, int nst, int et) {
  if (j >= m) {
    f[i][nst] = max(f[i][nst], f[i - 1][lst] + ev);
    return 0;
  }
  int bit = GetBit(lst, j);
  if (et) bit = 2;
  switch (bit) {
    case 0:
      dfs(i, j + 1, lst, ev + 1, nst + (p3[j] << 1), 0);
      dfs(i, j + 1, lst, ev, nst + p3[j], 0);
      if (j && GetBit(nst, j - 1) == 1) dfs(i, j + 1, lst, ev + 1, nst, 0);
      if (j < m - 1) dfs(i, j + 1, lst, ev + 1, nst, 1);
      break;
    case 1:
      dfs(i, j + 1, lst, ev + 1, nst, 0);
      break;
    case 2:
      dfs(i, j + 1, lst, ev, nst + p3[j], 0);
      break;
    default:
      break;
  }
  return 0;
}
int main() {
  cin >> n >> m;
  if (m > n) swap(n, m);
  p3[0] = 1;
  for (int i = 1; i <= 7; i++) p3[i] = p3[i - 1] * 3;
  memset(f, 0xff, sizeof(f));
  f[0][0] = 0;
  for (int i = 1; i <= n; i++)
    for (int lst = 0; lst < p3[m]; lst++)
      if (f[i - 1][lst] >= 0) dfs(i, 0, lst, 0, 0, 0);
  int ans = 0;
  for (int lst = 0; lst < p3[m]; lst++) {
    bool ok = true;
    for (int j = 0; j < m && ok; j++)
      if (GetBit(lst, j) == 2) ok = false;
    if (ok) ans = max(ans, f[n][lst]);
  }
  cout << ans << endl;
  return 0;
}
