#include <bits/stdc++.h>
using namespace std;
template <class T>
inline T pow2(T a) {
  return a * a;
}
const int maxn = (int)50;
;
bool fix[maxn][maxn], empty[maxn][maxn];
int n, m, ans = 0;
const int dx[] = {-1, 0, 1, 0};
const int dy[] = {0, 1, 0, -1};
bool ok(int x, int y) {
  if (x < 0 || x >= n) return false;
  if (y < 0 || y >= m) return false;
  return true;
}
pair<int, int> next(int x, int y) {
  if (y != m - 1) return make_pair(x, y + 1);
  return make_pair(x + 1, 0);
}
bool check(int x, int y) {
  if (!ok(x, y)) return false;
  if (fix[x][y]) return false;
  bool f = true;
  for (int i = 0; i < 4; i++)
    if (ok(x + dx[i], y + dy[i]) && fix[x + dx[i]][y + dy[i]]) f = false;
  return f;
}
int cnt = 0;
void dfs(int x, int y, int now, int cur) {
  cnt++;
  if (x == n) {
    if (cur == n * m) ans = max(ans, n * m - now);
    return;
  }
  pair<int, int> t = next(x, y);
  int f = false;
  for (int i = 0; i < 4; i++)
    if (ok(x + dx[i], y + dy[i])) {
      if (fix[x + dx[i]][y + dy[i]]) f++;
    }
  int tt = 0;
  for (int i = 0; i < 4; i++)
    if (check(x + dx[i], y + dy[i])) tt++;
  tt += check(x, y);
  fix[x][y] = true;
  if (!f || tt > 2) dfs(t.first, t.second, now + 1, cur + tt);
  fix[x][y] = false;
  if (!check(x - 1, y)) dfs(t.first, t.second, now, cur);
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cin >> n >> m;
  if (m < n) swap(n, m);
  if (n == 1) {
    cout << m - ((m + 2) / 3);
    return 0;
  }
  dfs(0, 0, 0, 0);
  cout << ans;
}
