#include <bits/stdc++.h>
using namespace std;
const int maxx = 40 + 7;
const int N = (1 << 7);
int DP[maxx][N][N];
int ans = INT_MAX;
int n, m;
bool valid(int a, int b, int c) {
  if (!(((b >> 0) & 1) || ((b >> 1) & 1) || ((c >> 0) & 1) || ((a >> 0) & 1)))
    return false;
  for (int i = 1; i < m; i++)
    if (!(((b >> i) & 1) || ((b >> (i + 1)) & 1) || ((b >> (i - 1)) & 1) ||
          ((a >> i) & 1) || ((c >> i) & 1)))
      return false;
  return true;
}
int main() {
  ios::sync_with_stdio(false);
  cin >> n >> m;
  if (n == 1 && m == 1) {
    cout << "0"
         << "\n";
    return 0;
  }
  if (n < m) swap(n, m);
  for (int i = 0; i < (1 << m); i++)
    for (int j = 0; j < (1 << m); j++) {
      if (valid(i, j, 0))
        DP[1][i][j] = __builtin_popcount(i) + __builtin_popcount(j);
      else
        DP[1][i][j] = -1;
    }
  for (int i = 2; i <= n; i++) {
    for (int j = 0; j < (1 << m); j++)
      for (int k = 0; k < (1 << m); k++) {
        DP[i][j][k] = INT_MAX;
        for (int l = 0; l < (1 << m); l++) {
          if (valid(j, k, l) && DP[i - 1][k][l] != -1)
            DP[i][j][k] =
                min(DP[i][j][k], DP[i - 1][k][l] + __builtin_popcount(j));
        }
      }
  }
  for (int i = 0; i < (1 << m); i++) ans = min(DP[n][0][i], ans);
  cout << (n * m) - ans << "\n";
}
