#include <bits/stdc++.h>
using namespace std;
int size01(int x) { return __builtin_popcount(x); }
const long long INFll = 0x3f3f3f3f3f3f3f3fLL;
const int INF = 0x7ffffff;
const int maxn = 1e5 + 100;
const int mod = 1000000007;
const double pi = acos(-1);
const double eps = 1e-10;
complex<double> rotate(complex<double> v, double a) {
  return v * polar(1.0, a);
}
int dx[] = {0, -1, 0, 1};
int dy[] = {-1, 0, 1, 0};
int N, M, dp[44][1 << 6 | 1][1 << 6 | 1];
void init() {
  scanf("%d%d", &N, &M);
  if (N < M) swap(N, M);
  memset(dp, -1, sizeof(dp));
}
int DFS(int n, int lastf, int nowf) {
  if (n == N + 1) return nowf == 0 ? 0 : INF;
  int &ret = dp[n][lastf][nowf];
  if (ret >= 0) return ret;
  ret = INF;
  int State0 = (1 << M) - 1;
  for (int i = 0; i < (1 << M); i++) {
    int nowfs = nowf | i;
    int nextf = lastf | nowfs | (nowfs << 1) | (nowfs >> 1);
    nextf = (~nextf) & State0;
    ret = min(ret, DFS(n + 1, nowfs, nextf) + size01(nowfs));
  }
  return ret;
}
void solve() { printf("%d\n", N * M - DFS(1, 0, 0)); }
int main() {
  init();
  solve();
  return 0;
}
