#include <bits/stdc++.h>
using namespace std;
const double pi = 3.1415926535897932384626433832795;
double eps = 1e-14;
char ch[1 << 20];
inline string gs() {
  scanf("%s", ch);
  return string(ch);
}
inline int gi() {
  int x;
  scanf("%d", &x);
  return x;
}
void error() {
  int ttt = 0;
  cout << 7 / ttt;
}
long long gcd(long long a, long long b) { return (!a) ? b : gcd(b % a, a); }
int dp[41][1 << 6][1 << 6];
int N, M;
int bc[111111];
int rec(int y, int m1, int m0) {
  if (N == y) return (m1 == ((1 << M) - 1)) ? 0 : 1 << 30;
  int &r = dp[y][m1][m0];
  if (r != -1) return r;
  r = 1 << 30;
  for (int m = (0), _b(1 << M); m < _b; ++m) {
    int mm2 = m1 | m;
    int mm1 = ((m0 | m | (m >> 1) | (m << 1)) & ((1 << M) - 1));
    int mm0 = m;
    if (mm2 != ((1 << M) - 1)) continue;
    int v = rec(y + 1, mm1, mm0) + bc[m];
    if (v < r) r = v;
  }
  return r;
}
int main() {
  bc[0] = 0;
  for (int i = (1), _b(111111); i < _b; ++i) bc[i] = bc[i >> 1] + (i & 1);
  N = gi();
  M = gi();
  if (N < M) swap(N, M);
  memset(dp, -1, sizeof(dp));
  int r = rec(0, (1 << M) - 1, 0);
  cout << N * M - r << endl;
  return 0;
}
