#include <bits/stdc++.h>
using namespace std;
const int Max = (1 << 7), Maxn = 45;
int n, m, dp[Maxn][Max][Max], ans = INT_MAX;
bool ok(int a, int b, int c) {
  if (!((b >> 0) & 1) && !((a >> 0) & 1) && !((c >> 0) & 1) && !((b >> 1) & 1))
    return false;
  if (!((b >> (m - 1)) & 1) && !((a >> (m - 1)) & 1) && !((c >> (m - 1)) & 1) &&
      !((b >> (m - 2)) & 1))
    return false;
  for (int i = m - 2; i > 0; i--)
    if (!((b >> i) & 1) && !((a >> i) & 1) && !((c >> i) & 1) &&
        !((b >> (i - 1)) & 1) && !((b >> (i + 1)) & 1))
      return false;
  return true;
}
int main() {
  cin >> n >> m;
  if (n < m) swap(n, m);
  for (int i = 0; i < (1 << m); i++)
    for (int j = 0; j < (1 << m); j++) dp[0][i][j] = n * m;
  for (int i = 0; i < (1 << m); i++) dp[0][0][i] = __builtin_popcount(i);
  for (int i = 1; i < n; i++) {
    for (int j = 0; j < (1 << m); j++) {
      for (int k = 0; k < (1 << m); k++) {
        dp[i][k][j] = n * m;
        for (int l = 0; l < (1 << m); l++) {
          if (ok(j, k, l))
            dp[i][k][j] =
                min(dp[i][k][j], dp[i - 1][l][k] + __builtin_popcount(j));
        }
      }
    }
  }
  for (int i = 0; i < (1 << m); i++)
    for (int j = 0; j < (1 << m); j++)
      if (ok(0, j, i)) ans = min(ans, dp[n - 1][i][j]);
  cout << n * m - ans << endl;
  return 0;
}
