#include <bits/stdc++.h>
using namespace std;
int n, m;
int a[50][50];
int min1;
int dx[6] = {0, 0, 1, 0, -1, 0}, dy[6] = {0, 0, 0, 1, 0, -1};
void dfs(int x) {
  int i, j, f = 0, x1, x2, xx, y1, y2, yy;
  vector<pair<int, int> > tmp;
  for (i = 1; i <= n; i++) {
    for (j = 1; j <= m; j++) {
      if (!a[i][j]) {
        f = 1;
        break;
      }
    }
    if (f) {
      break;
    }
  }
  if (!f) {
    min1 = x;
    return;
  }
  if (x + 1 >= min1) return;
  xx = i;
  yy = j;
  for (int k = 1; k <= 5; k++) {
    x2 = dx[k] + xx;
    y2 = dy[k] + yy;
    if (x2 >= 1 && x2 <= n && y2 >= 1 && y2 <= m) {
      tmp.clear();
      for (i = 1; i <= 5; i++) {
        x1 = x2 + dx[i];
        y1 = y2 + dy[i];
        if (x1 >= 1 && x1 <= n && y1 >= 1 && y1 <= m && !a[x1][y1]) {
          tmp.push_back(make_pair(x1, y1));
          a[x1][y1] = 1;
        }
      }
      dfs(x + 1);
      for (i = 0; i < tmp.size(); i++) {
        a[tmp[i].first][tmp[i].second] = 0;
      }
    }
  }
}
int main() {
  cin >> n >> m;
  memset(a, 0, sizeof(a));
  min1 = m * n;
  dfs(0);
  cout << (m * n - min1);
  return 0;
}
