#include <bits/stdc++.h>
using namespace std;
inline int Max(int a, int b) { return (a > b ? a : b); }
inline int Min(int a, int b) { return (a > b ? b : a); }
int dp[45][65][65];
int cnt[65], K;
void Init() {
  for (int i = 0; i < 65; i++) {
    int n = i;
    int x = 0;
    while (n) {
      x++;
      n &= (n - 1);
    }
    cnt[i] = x;
  }
}
int get(int num) {
  int k = K - 1;
  return (num | ((num >> 1)) | ((num << 1) & k));
}
int main() {
  int i, j, k, t;
  int a, b, c, x, y, z;
  int n, m;
  Init();
  while (scanf("%d%d", &n, &m) != EOF) {
    if (n > m) swap(n, m);
    K = (1 << n);
    if (m == 1 && n == 1) {
      puts("0");
      continue;
    }
    for (i = 0; i < K; i++)
      for (j = 0; j < K; j++) {
        if ((i | get(j)) == K - 1) {
          dp[2][i][j] = cnt[i] + cnt[j];
        } else
          dp[2][i][j] = 100000000;
      }
    for (i = 3; i <= m; i++)
      for (j = 0; j < K; j++)
        for (k = 0; k < K; k++) {
          dp[i][j][k] = 100000000;
          for (t = 0; t < K; t++) {
            int my = j | get(k) | t;
            if (dp[i - 1][k][t] == 100000000 || my != K - 1) continue;
            dp[i][j][k] = Min(dp[i][j][k], dp[i - 1][k][t] + cnt[j]);
          }
        }
    int ans = 100000000;
    for (j = 0; j < K; j++)
      for (k = 0; k < K; k++)
        for (t = 0; t < K; t++) {
          if ((get(t | j) | k) != K - 1) continue;
          ans = Min(ans, dp[m][j][k] + cnt[t]);
        }
    printf("%d\n", n * m - ans);
  }
  return 0;
}
