#include <bits/stdc++.h>
using namespace std;
int n, m, f[44][1 << 6][1 << 6], gs[1 << 6];
int main() {
  for (int i = 0; i < (1 << 6); i++) {
    gs[i] = 0;
    for (int j = 0; j < 6; j++)
      if (i & (1 << j)) gs[i]++;
  }
  scanf("%d%d", &n, &m);
  if (n < m) swap(n, m);
  memset(f, -1, sizeof(f));
  for (int i = 0; i < (1 << m); i++) f[0][0][i] = gs[i];
  for (int i = 1; i < n; i++)
    for (int j = 0; j < (1 << m); j++)
      for (int k = 0; k < (1 << m); k++)
        if (f[i - 1][j][k] != -1)
          for (int l = 0; l < (1 << m); l++)
            if ((((j | k | (k << 1) | (k >> 1) | l)) & ((1 << m) - 1)) ==
                (1 << m) - 1)
              if (f[i][k][l] == -1)
                f[i][k][l] = f[i - 1][j][k] + gs[l];
              else
                f[i][k][l] = min(f[i][k][l], f[i - 1][j][k] + gs[l]);
  int ans = 100;
  for (int i = 0; i < (1 << m); i++)
    for (int j = 0; j < (1 << m); j++)
      if (f[n - 1][i][j] != -1 &&
          ((i | j | (j << 1) | (j >> 1)) & ((1 << m) - 1)) == ((1 << m) - 1))
        ans = min(ans, f[n - 1][i][j]);
  if (n == 1 && m == 1)
    printf("0\n");
  else
    printf("%d\n", n * m - ans);
  return 0;
}
