#include <bits/stdc++.h>
using namespace std;
const long long mod = 1000000007;
int n, m;
int popCount(int x) {
  int count = 0;
  while (x) {
    ++count;
    x &= x - 1;
  }
  return count;
}
inline bool Okay(int x) { return (((1 << m) - 1) & x) == ((1 << m) - 1); }
int main() {
  ios::sync_with_stdio(false);
  cin >> n >> m;
  if (n < m) swap(n, m);
  int*** Arr = new int**[n + 1];
  for (int i = 0; i <= n; ++i) {
    Arr[i] = new int*[1 << m];
    for (int j = 0; j < (1 << m); ++j) {
      Arr[i][j] = new int[1 << m];
      for (int k = 0; k < (1 << m); ++k) {
        Arr[i][j][k] = 100000000;
      }
    }
  }
  Arr[0][(1 << m) - 1][0] = 0;
  for (int i = 0; i < n; ++i) {
    for (int j = 0; j < (1 << m); ++j) {
      for (int k = 0; k < (1 << m); ++k) {
        for (int t = 0; t < (1 << m); ++t) {
          if (Okay(j | k | t | (k >> 1) | (k << 1)))
            Arr[i + 1][k][t] =
                min(Arr[i + 1][k][t], Arr[i][j][k] + popCount(t));
        }
      }
    }
  }
  int _ans = 100000;
  for (int k = 0; k < (1 << m); ++k) {
    for (int t = 0; t < (1 << m); ++t) {
      if (Okay(k | t | (t << 1) | (t >> 1))) _ans = min(_ans, Arr[n][k][t]);
    }
  }
  cout << n * m - _ans;
  return 0;
}
