#include <bits/stdc++.h>
using namespace std;
const int N = 1e5 + 5;
const int mod = 1e9 + 7;
int n, m;
char dp[44][1 << 6][1 << 6][1 << 6];
char solve(int row, int col, int b4Mask, int curMask, int afMask) {
  if (row == n) return __builtin_popcount(b4Mask);
  if (col == m)
    return __builtin_popcount(b4Mask) + solve(row + 1, 0, curMask, afMask, 0);
  char &ret = dp[row * m + col][b4Mask][curMask][afMask];
  if (~ret) return ret;
  ret = 40;
  ret = min(ret, solve(row, col + 1, b4Mask, curMask | (1 << col), afMask));
  if (row != 0)
    ret = min(ret, solve(row, col + 1, b4Mask | (1 << col), curMask, afMask));
  if (row != n - 1)
    ret = min(ret, solve(row, col + 1, b4Mask, curMask, afMask | (1 << col)));
  if (col != 0)
    ret = min(ret,
              solve(row, col + 1, b4Mask, curMask | (1 << (col - 1)), afMask));
  if (col != m - 1)
    ret = min(ret,
              solve(row, col + 1, b4Mask, curMask | (1 << (col + 1)), afMask));
  return ret;
}
int main() {
  cin >> n >> m;
  if (n < m) swap(n, m);
  memset(dp, -1, sizeof dp);
  cout << n * m - (int)solve(0, 0, 0, 0, 0) << '\n';
  return 0;
}
