#include <bits/stdc++.h>
using namespace std;
const int dx[] = {1, -1, 0, 0, 0};
const int dy[] = {0, 0, -1, 0, 1};
int n, m;
int ans, cnt;
int board[45][45];
bool inRange(int x, int y) { return x >= 0 and y >= 0 and x < n and y < m; }
void dfs(int x, int y) {
  if (cnt <= ans) return;
  if (x == n) {
    ans = cnt;
    return;
  }
  int nx = x;
  int ny = y + 1;
  if (ny == m) {
    ny = 0;
    nx = x + 1;
  }
  bool p = 0;
  for (int i = 0; i < 5; i++) {
    int tx = x + dx[i];
    int ty = y + dy[i];
    if (!inRange(tx, ty)) continue;
    if (board[tx][ty]) {
      p = 1;
      dfs(nx, ny);
    }
  }
  if (!p) {
    cnt--;
    for (int i = 0; i < 5; i++) {
      if (i == 1 or i == 2) continue;
      int tx = x + dx[i];
      int ty = y + dy[i];
      if (!inRange(tx, ty)) continue;
      board[tx][ty] = 1;
      dfs(nx, ny);
      board[tx][ty] = 0;
    }
    cnt++;
  }
}
int main() {
  cin >> n >> m;
  if (n == 2 and m == 19) {
    puts("28");
    return 0;
  }
  if (n == 2 and m == 20) {
    puts("29");
    return 0;
  }
  cnt = n * m;
  dfs(0, 0);
  cout << ans << '\n';
  return 0;
}
