#include <bits/stdc++.h>
using namespace std;
int n, m, ans;
int a[45][45];
int dx[] = {0, 1, 0, -1, 0};
int dy[] = {0, 0, 1, 0, -1};
void Find(int x) {
  vector<pair<int, int> > used;
  int i, j, k, ch1 = 0;
  for (i = 0; i < n; i++) {
    for (j = 0; j < m; j++)
      if (a[i][j] == 0) {
        ch1 = 1;
        break;
      }
    if (ch1 == 1) break;
  }
  if (ch1 == 0) {
    ans = x;
    return;
  }
  if (x + 1 >= ans) return;
  int xx = i;
  int yy = j;
  for (k = 0; k < 5; k++) {
    int tx = xx + dx[k];
    int ty = yy + dy[k];
    if (tx >= 0 and ty >= 0 and tx < n and ty < m) {
      used.clear();
      for (i = 0; i < 5; i++) {
        int x1 = tx + dx[i];
        int y1 = ty + dy[i];
        if (x1 >= 0 and y1 >= 0 and x1 < n and y1 < m and a[x1][y1] == 0) {
          used.push_back(make_pair(x1, y1));
          a[x1][y1] = 1;
        }
      }
      Find(x + 1);
      for (i = 0; i < used.size(); i++) a[used[i].first][used[i].second] = 0;
    }
  }
}
int main() {
  scanf("%d%d", &n, &m);
  ans = n * m;
  Find(0);
  printf("%d\n", n * m - ans);
  return 0;
}
