#include <bits/stdc++.h>
using namespace std;
bool had[45][45];
int lea;
pair<int, int> la[45][45];
int dx[5] = {1, 0, 0, 0, -1}, dy[5] = {0, 1, -1, 0, 0};
int n, m;
void dfs(int x, int y, int chan, int dep) {
  if (x == n) {
    lea = min(chan, lea);
    return;
  }
  if (y == m) {
    dfs(x + 1, 0, chan, dep);
    return;
  }
  if (chan + dep / 4 > lea) return;
  bool flag = 0, mu = 0;
  for (int i = 0; i < 5; i++) {
    int xx = x + dx[i], yy = y + dy[i];
    if (xx >= 0 && xx < n && yy >= 0 && yy < m && had[xx][yy]) {
      if (la[xx][yy].first == x && la[xx][yy].second == y) mu = 1;
      flag = 1;
    }
  }
  if (!flag) {
    dfs(x, y + 1, chan, dep - 1);
    return;
  }
  vector<pair<int, int> > tmp;
  int cnt = 0;
  for (int i = 0; i < 5; i++) {
    int xx = x + dx[i], yy = y + dy[i];
    if (xx >= 0 && xx < n && yy >= 0 && yy < m && had[xx][yy]) {
      cnt++;
      tmp.push_back(make_pair(xx, yy));
      had[xx][yy] = 0;
    }
  }
  dfs(x, y + 1, chan + 1, dep - 1);
  for (int i = 0; i < tmp.size(); i++) {
    had[tmp[i].first][tmp[i].second] = 1;
  }
  if (!mu) {
    dfs(x, y + 1, chan, dep - 1);
  }
}
int main() {
  cin >> n >> m;
  lea = ((n + 2) / 3) * ((m + 1) / 2) * 2;
  for (int i = 0; i < n; i++) {
    for (int j = 0; j < m; j++) {
      had[i][j] = 1;
    }
  }
  for (int i = 0; i < n - 1; i++) {
    for (int j = 0; j < m; j++) {
      la[i][j] = make_pair(i + 1, j);
    }
  }
  for (int i = 0; i < m - 1; i++) {
    la[n - 1][i] = make_pair(n - 1, i + 1);
  }
  la[n - 1][m - 1] = make_pair(n - 1, m - 1);
  dfs(0, 0, 0, n * m);
  cout << n * m - lea;
  return 0;
}
