#include <bits/stdc++.h>
using namespace std;
const int MAX = 100;
const int inf = 0x3f3f3f3f;
int dp[MAX][MAX][MAX], cnt[MAX];
void init(int n) {
  memset(cnt, 0, sizeof(cnt));
  for (int i = 0; i < (1 << n); i++) {
    for (int j = i; j; j -= j & -j) cnt[i]++;
  }
}
int main() {
  int n, m;
  while (scanf("%d %d", &n, &m) == 2) {
    if (m > n) swap(n, m);
    init(m);
    int ret = inf;
    for (int i = 0; i < 100; i++) {
      for (int j = 0; j < 100; j++) {
        for (int k = 0; k < 100; k++) {
          dp[i][j][k] = inf;
        }
      }
    }
    dp[0][0][0] = 0;
    for (int i = 0; i < n; i++) {
      for (int p2 = 0; p2 < (1 << m); p2++) {
        for (int p1 = 0; p1 < (1 << m); p1++) {
          for (int j = 0; j < (1 << m); j++) {
            if (i && ((p1 | p2 | (p2 >> 1) | (p2 << 1) | j) & ((1 << m) - 1)) !=
                         ((1 << m) - 1))
              continue;
            dp[i + 1][p2][j] = min(dp[i + 1][p2][j], dp[i][p1][p2] + cnt[j]);
            if (i == n - 1 && ((p2 | j | (j << 1) | (j >> 1)) &
                               ((1 << m) - 1)) == ((1 << m) - 1))
              ret = min(ret, dp[i + 1][p2][j]);
          }
        }
      }
    }
    printf("%d\n", n * m - ret);
  }
}
