#include <bits/stdc++.h>
using namespace std;
bool bit(int mask, int i) { return mask & (1 << i); }
int bitcnt(int mask) {
  int result = 0;
  for (int i = 1; i <= mask; i <<= 1) {
    result += ((mask & i) ? 1 : 0);
  }
  return result;
}
int main() {
  int n, m;
  cin >> n >> m;
  if (n > m) {
    int tmp = n;
    n = m;
    m = tmp;
  }
  if (n == 1) {
    cout << m - (m / 3 + (m % 3 == 0 ? 0 : 1));
    return 0;
  }
  int maxmask = 1 << n;
  int MAX_MASK = 1 << 6, MAX_M = 20;
  int dp[MAX_M][MAX_MASK][MAX_MASK];
  memset(dp, 0, sizeof(dp));
  int MAX = 50;
  for (int cmask = 0; cmask < maxmask; ++cmask)
    for (int nmask = 0; nmask < maxmask; ++nmask) {
      bool ok = true;
      if (!(bit(cmask, 0) || bit(cmask, 1) || bit(nmask, 0))) ok = false;
      for (int i = 1; ok && i < n - 1; ++i)
        if (!(bit(cmask, i - 1) || bit(cmask, i) || bit(cmask, i + 1) ||
              bit(nmask, i)))
          ok = false;
      if (!(bit(cmask, n - 1) || bit(cmask, n - 2) || bit(nmask, n - 1)))
        ok = false;
      dp[0][cmask][nmask] = ok ? bitcnt(cmask) : MAX;
    }
  for (int k = 1; k < m; ++k)
    for (int cmask = 0; cmask < maxmask; ++cmask)
      for (int nmask = 0; nmask < maxmask; ++nmask) {
        int val = MAX, cur;
        for (int pmask = 0; pmask < maxmask; ++pmask) {
          bool ok = true;
          if (!(bit(cmask, 0) || bit(cmask, 1) || bit(nmask, 0) ||
                bit(pmask, 0)))
            ok = false;
          for (int i = 1; ok && i < n - 1; ++i)
            if (!(bit(cmask, i - 1) || bit(cmask, i) || bit(cmask, i + 1) ||
                  bit(nmask, i) || bit(pmask, i)))
              ok = false;
          if (!(bit(cmask, n - 1) || bit(cmask, n - 2) || bit(nmask, n - 1) ||
                bit(pmask, n - 1)))
            ok = false;
          if (ok) {
            cur = dp[k - 1][pmask][cmask] + bitcnt(cmask);
            if (cur < val) val = cur;
          }
        }
        dp[k][cmask][nmask] = val;
        if (k == m - 1) break;
      }
  int ans = MAX;
  for (int mask = 0; mask < maxmask; ++mask)
    if (dp[m - 1][mask][0] < ans) ans = dp[m - 1][mask][0];
  cout << n * m - ans;
  return 0;
}
