#include <bits/stdc++.h>
using namespace std;
int dp[40][2][1 << 6][1 << 6];
int n, m;
int C(int a, int b) { return a & (1 << b); }
int dfs(int a, int b, int c, int mask1, int mask2) {
  if (a == m) return 0;
  if (b == n) return dfs(a + 1, 0, 0, mask1, mask2);
  if (dp[a * n + b][c][mask1][mask2] != -1)
    return dp[a * n + b][c][mask1][mask2];
  int *p = &dp[a * n + b][c][mask1][mask2];
  (*p) = 0;
  int nk1, nk2, add = 0;
  if (c) {
    nk1 = mask1 | (1 << b), nk2 = mask2 - (mask2 & (1 << b)), add = 0;
  } else {
    nk2 = mask2 - C(mask2, b);
    nk1 = mask1 | (1 << b);
  }
  (*p) = max((*p), dfs(a, b + 1, 0, nk1, nk2) + add);
  add = 0;
  if (a != 0) {
    if (c) {
      nk1 = mask1 | (1 << b);
      nk2 = mask2 - C(mask2, b);
    } else {
      nk1 = mask1 - C(mask1, b);
      nk2 = mask2 - C(mask2, b);
    }
    if ((1 << b) & mask2) nk1 = nk1 | (1 << b);
    if (!((1 << b) & mask1)) add--;
    if (!((1 << b) & nk1)) add++;
    (*p) = max((*p), dfs(a, b + 1, 0, nk1, nk2) + add);
  }
  add = 0;
  if (a != m - 1) {
    if (c) {
      nk1 = mask1 | (1 << b);
      nk2 = mask2 | (1 << b);
    } else {
      nk1 = mask1 - C(mask1, b);
      nk2 = mask2 | (1 << b);
    }
    if ((1 << b) & mask2) nk1 = nk1 | (1 << b);
    if (!((1 << b) & nk1)) add++;
    (*p) = max((*p), dfs(a, b + 1, 0, nk1, nk2) + add);
  }
  add = 0;
  if (b != 0) {
    if (c) {
      nk1 = mask1 | (1 << b);
      nk2 = mask2 - C(mask2, b);
    } else {
      nk1 = mask1 - C(mask1, b);
      nk2 = mask2 - C(mask2, b);
    }
    if ((1 << b) & mask2) nk1 = nk1 | (1 << b);
    if (!((1 << (b - 1)) & mask1)) {
      add--;
      nk1 |= (1 << (b - 1));
    }
    if (!((1 << b) & nk1)) add++;
    (*p) = max((*p), dfs(a, b + 1, 0, nk1, nk2) + add);
  }
  add = 0;
  if (b != n - 1) {
    if (c) {
      nk1 = mask1 | (1 << b);
      nk2 = mask2 - C(mask2, b);
    } else {
      nk1 = mask1 - C(mask1, b);
      nk2 = mask2 - C(mask2, b);
    }
    if ((1 << b) & mask2) nk1 = nk1 | (1 << b);
    if (!((1 << b) & nk1)) add++;
    (*p) = max((*p), dfs(a, b + 1, 1, nk1, nk2) + add);
  }
  return (*p);
}
int main() {
  memset(dp, -1, sizeof(dp));
  scanf("%d%d", &n, &m);
  if (n > m) swap(n, m);
  if (n == 1) {
    int ans = 0;
    ans += m / 3 * 2;
    if (m % 3 == 2) ans++;
    printf("%d\n", ans);
    return 0;
  }
  printf("%d\n", dfs(0, 0, 0, (1 << n) - 1, 0));
}
