#include <bits/stdc++.h>
#pragma comment(linker, "/STACK:16777216")
using namespace std;
template <typename T>
inline bool remin(T& c, const T& n) {
  if (n < c) {
    c = n;
    return 1;
  }
  return 0;
}
template <typename T>
inline bool remax(T& c, const T& n) {
  if (c < n) {
    c = n;
    return 1;
  }
  return 0;
}
template <typename T>
inline void addmod(T& c, const T& n, const T& m) {
  c = (c + n) % m;
}
int _in;
int in() {
  scanf("%d", &_in);
  return _in;
}
const int N = 41, M = 1 << 6;
int dp[N][M][M], um;
inline bool compatible(const int& mask, const int& pts) {
  return (mask & pts) == 0 && ((mask << 1) & pts) == 0 &&
         ((mask >> 1) & pts) == 0;
}
int bitCount(int num) {
  int cnt = 0;
  while (num != 0) {
    ++cnt;
    num &= num - 1;
  }
  return cnt;
}
int main() {
  int n, m, t, i, j, k;
  scanf("%d%d", &n, &m);
  if (n < m) swap(n, m);
  um = 1 << m;
  memset(dp, 0x7f, sizeof(dp));
  dp[0][0][0] = 0;
  int dest;
  for (t = 1; t <= n; ++t)
    for ((i) = (0); (i) < (um); ++(i))
      for ((j) = (0); (j) < (um); ++(j))
        for ((k) = (0); (k) < (um); ++(k))
          if ((i & ~k) == 0)
            remin(dp[t][~(k | (k >> 1) | (k << 1) | j) & (um - 1)][k],
                  dp[t - 1][i][j] + bitCount(j));
  j = -1;
  for ((i) = (0); (i) < (M); ++(i)) {
    k = dp[n][0][i] + bitCount(i);
    if (j < 0 || j > k) j = k;
  }
  printf("%d\n", n * m - j);
  return 0;
}
