#include <bits/stdc++.h>
using namespace std;
int ans, n, m, cnt, sum, t;
int a[45][45];
const int dx[5] = {0, 0, 0, 1, -1};
const int dy[5] = {0, 1, -1, 0, 0};
bool safe(int x, int y) {
  return x >= 0 && x < n && y >= 0 && y < m && a[x][y];
}
void dfs(int x, int y, int cur) {
  if (ans > cnt && ans - cnt >= sum - cur) return;
  for (int i = 0; i < 5; i++) {
    int nx = x + dx[i], ny = y + dy[i];
    if (nx == x && ny == y && a[x][y] == 1) continue;
    if ((nx != x || ny != y) && a[x][y] > 1) continue;
    if (safe(nx, ny)) {
      a[x][y]--;
      a[nx][ny]++;
      if (!a[x][y]) cnt++;
      if (sum == cur) {
        if (cnt > ans)
          ans = cnt;
        else if (!a[x][y])
          return;
      }
      if (cur < sum) {
        int cx = x + 1, cy = y;
        if (cx == n) cx = 0, cy++;
        dfs(cx, cy, cur + 1);
      }
      if (!a[x][y]) cnt--;
      a[x][y]++;
      a[nx][ny]--;
    }
  }
}
int main() {
  scanf("%d%d", &n, &m);
  if (n > m) t = m, m = n, n = t;
  sum = n * m;
  for (int i = 0; i < n; i++)
    for (int j = 0; j < m; j++) a[i][j] = 1;
  dfs(0, 0, 1);
  printf("%d\n", ans);
  return 0;
}
