#include <bits/stdc++.h>
using namespace std;
const int INF = 100;
int n, m;
bool Zap(int x, int nr) { return ((x & (1 << nr)) > 0); }
bool OkMask(int m1, int m2) {
  for (int i = 0; i < n; ++i)
    if (Zap(m1, i) && Zap(m2, i)) return false;
  for (int i = 1; i < n; ++i)
    if (!Zap(m1, i) && Zap(m1, i - 1) && Zap(m2, i)) return false;
  for (int i = 0; i < n - 1; ++i)
    if (!Zap(m1, i) && Zap(m1, i + 1) && Zap(m2, i)) return false;
  return true;
}
int main() {
  ios_base::sync_with_stdio(0);
  cin >> n >> m;
  if (n > m) swap(n, m);
  int dp[40][1 << 6][1 << 6];
  for (int i = 0; i < 40; ++i)
    for (int j = 0; j < (1 << 6); ++j)
      for (int k = 0; k < (1 << 6); ++k) dp[i][j][k] = INF;
  for (int mask1 = 0; mask1 < (1 << n); ++mask1) {
    for (int mask2 = 0; mask2 < (1 << n); ++mask2) {
      if (!OkMask(mask1, mask2)) continue;
      bool lewo = false;
      for (int i = 0; i < n; ++i)
        if (!Zap(mask1, i) && !Zap(mask2, i) &&
            (i == 0 || !Zap(mask1, i - 1)) &&
            (i == n - 1 || !Zap(mask1, i + 1)))
          lewo = true;
      if (lewo) continue;
      dp[0][mask1][mask2] = __builtin_popcount(mask1);
    }
  }
  for (int i = 1; i < m; ++i) {
    for (int mask1 = 0; mask1 < (1 << n); ++mask1) {
      for (int mask2 = 0; mask2 < (1 << n); ++mask2) {
        if (!OkMask(mask1, mask2)) continue;
        for (int mask1Pop = 0; mask1Pop < (1 << n); ++mask1Pop) {
          bool lewoZle = false;
          for (int j = 0; j < n; ++j)
            if (!Zap(mask1, j) && !Zap(mask2, j) && !Zap(mask1Pop, j) &&
                (j == 0 || !Zap(mask1, j - 1)) &&
                (j == n - 1 || !Zap(mask1, j + 1)))
              lewoZle = true;
          if (lewoZle) continue;
          int mask2Pop = 0;
          for (int j = 0; j < n; ++j) {
            if (!Zap(mask1Pop, j) && (j == 0 || !Zap(mask1Pop, j - 1)) &&
                (j == n - 1 || !Zap(mask1Pop, j + 1)) && Zap(mask1, j))
              mask2Pop |= (1 << j);
          }
          if (dp[i - 1][mask1Pop][mask2Pop] != INF)
            dp[i][mask1][mask2] =
                min(dp[i][mask1][mask2],
                    dp[i - 1][mask1Pop][mask2Pop] + __builtin_popcount(mask1));
        }
      }
    }
  }
  int odp = INF;
  for (int mask = 0; mask < (1 << n); ++mask)
    odp = min(odp, dp[m - 1][mask][0]);
  cout << n * m - odp;
  return 0;
}
