#include <bits/stdc++.h>
using namespace std;
const int inf = 1 << 30;
int mat[50][50];
int ans = -10000;
int n, m;
int dx[5] = {0, 0, 1, -1, 0}, dy[5] = {1, -1, 0, 0, 0};
inline bool in(int x, int y) {
  if (x < 0 || y < 0 || x >= 45 || y >= 45) return false;
  return true;
}
void dfs(int x, int cnt) {
  if (x >= n * m) {
    if (mat[m - 1][n - 1] != 0 && (n == 1 || mat[m - 1][n - 2] != 0))
      ans = max(ans, n * m - cnt);
    return;
  }
  if (n * m - cnt < ans) return;
  int i = x / n, j = x % n;
  if (i == m - 1 && j > 1 && mat[i][j - 2] == 0) return;
  if ((i == 0 || mat[i - 1][j] != 0)) dfs(x + 1, cnt);
  for (register int k = 0; k < 5; k++)
    if (in(i + dx[k], j + dy[k])) mat[i + dx[k]][j + dy[k]]++;
  dfs(x + 1, cnt + 1);
  for (register int k = 0; k < 5; k++)
    if (in(i + dx[k], j + dy[k])) mat[i + dx[k]][j + dy[k]]--;
}
int main() {
  cin >> n >> m;
  if (n > m) swap(n, m);
  dfs(0, 0);
  cout << ans << endl;
}
