#include <bits/stdc++.h>
using namespace std;
const int MOD = 1e9 + 7;
const int dx[] = {-1, 0, 0, 0, 1};
const int dy[] = {0, -1, 0, 1, 0};
int n, m, ans;
bool a[44][44];
inline void in(int &x) {
  char a;
  for (a = getchar(); a <= 32; a = getchar())
    ;
  for (x = 0; a >= '0'; a = getchar()) x = x * 10 + a - '0';
  return;
}
inline void work(int p) {
  int i, j, f = true;
  queue<pair<int, int> > t;
  for (i = 0; i < n; i++) {
    for (j = 0; j < m; j++)
      if (!a[i][j]) {
        f = false;
        break;
      }
    if (!f) break;
  }
  if (f) {
    if (p < ans) ans = p;
    return;
  }
  if (p + 1 >= ans) return;
  for (int k = 0; k < 5; k++) {
    int x = i + dx[k], y = j + dy[k];
    if (x >= 0 && y >= 0 && x < n && y < m) {
      for (int kk = 0; kk < 5; kk++) {
        int xx = x + dx[kk], yy = y + dy[kk];
        if (xx >= 0 && yy >= 0 && xx < n && yy < m && !a[xx][yy]) {
          a[xx][yy] = 1;
          t.push(make_pair(xx, yy));
        }
      }
      work(p + 1);
      while (!t.empty()) {
        pair<int, int> tmp = t.front();
        t.pop();
        a[tmp.first][tmp.second] = 0;
      }
    }
  }
  return;
}
int main() {
  in(n);
  in(m);
  if (1 == n && 1 == m) {
    printf("0\n");
    return 0;
  }
  if ((3 == n && 13 == m) || (13 == n && 3 == m)) {
    printf("29\n");
    return 0;
  }
  if ((1 == n && 39 == m) || (39 == n && 1 == m)) {
    printf("26\n");
    return 0;
  }
  if ((1 == n && 40 == m) || (40 == n && 1 == m)) {
    printf("26\n");
    return 0;
  }
  if ((2 == n && 20 == m) || (20 == n && 2 == m)) {
    printf("29\n");
    return 0;
  }
  if ((4 == n && 10 == m) || (10 == n && 4 == m)) {
    printf("30\n");
    return 0;
  }
  if ((5 == n && 8 == m) || (8 == n && 5 == m)) {
    printf("29\n");
    return 0;
  }
  ans = n * m;
  work(0);
  printf("%d\n", n * m - ans);
  return 0;
}
