#include <bits/stdc++.h>
const int MAXR = 620;
const int MAXC = 620;
const int TOTAL = (MAXR + 1) * (MAXC + 1);
const int MAXV = 0x3F3F3F3F;
using namespace std;
int dx[5] = {0, 0, 0, -1, 1};
int dy[5] = {0, 1, -1, 0, 0};
int mat[MAXR][MAXC];
int cid[TOTAL], rid[TOTAL], s[MAXC];
int res[MAXR];
int l[TOTAL], r[TOTAL], u[TOTAL], d[TOTAL];
int lastc[MAXC];
void remove(const int& col) {
  for (int i = d[col]; i != col; i = d[i]) {
    r[l[i]] = r[i];
    l[r[i]] = l[i];
  }
}
void resume(const int& col) {
  for (int i = u[col]; i != col; i = u[i]) {
    r[l[i]] = i;
    l[r[i]] = i;
  }
}
inline void addlr(const int& ln, const int& rn) {
  l[r[ln]] = rn;
  r[rn] = r[ln];
  r[ln] = rn;
  l[rn] = ln;
}
inline void addud(const int& un, const int& dn) {
  u[d[un]] = dn;
  d[dn] = d[un];
  d[un] = dn;
  u[dn] = un;
}
bool visit[MAXC];
int H() {
  int res = 0;
  memset(visit, false, sizeof(visit));
  for (int c = r[0]; c != 0; c = r[c]) {
    if (!visit[c]) {
      res++;
      visit[c] = true;
      for (int i = d[c]; i != c; i = d[i])
        for (int j = r[i]; j != i; j = r[j]) visit[cid[j]] = true;
    }
  }
  return res;
}
int mi;
void search(int k, int sum) {
  if (sum + H() >= mi) return;
  if (r[0] == 0) {
    mi = min(mi, sum);
    return;
  }
  int c, miv = 1000000;
  for (int i = r[0]; i != 0; i = r[i]) {
    if (s[i] < miv) {
      miv = s[i];
      c = i;
    }
  }
  for (int i = d[c]; i != c; i = d[i]) {
    res[k] = rid[i];
    remove(i);
    for (int j = r[i]; j != i; j = r[j]) remove(j);
    search(k + 1, sum + 1);
    for (int j = l[i]; j != i; j = l[j]) resume(j);
    resume(i);
  }
}
void adapt(int n, int m) {
  memset(s, 0, sizeof(s));
  l[0] = r[0] = 0;
  for (int i = 1; i <= m; i++) {
    addlr(i - 1, i);
    u[i] = d[i] = i;
    lastc[i] = i;
  }
  int ind = m + 1;
  for (int i = 1; i <= n; i++) {
    bool isfirst = true;
    for (int j = 1; j <= m; j++) {
      if (mat[i][j]) {
        if (isfirst) {
          isfirst = false;
          l[ind] = r[ind] = ind;
        } else {
          addlr(ind - 1, ind);
        }
        addud(lastc[j], ind);
        lastc[j] = ind;
        rid[ind] = i;
        cid[ind] = j;
        s[j]++;
        ind++;
      }
    }
  }
}
int main() {
  int n, m;
  while (scanf("%d%d", &n, &m) != EOF) {
    memset(mat, 0, sizeof(mat));
    for (int i = 1; i <= n; i++) {
      for (int j = 1; j <= m; j++) {
        for (int k = 0; k < 5; k++) {
          int x = i + dx[k];
          int y = j + dy[k];
          if (x >= 1 && x <= n && y >= 1 && y <= m) {
            mat[(i - 1) * m + j][(x - 1) * m + y] = 1;
          }
        }
      }
    }
    adapt(n * m, n * m);
    mi = n * m;
    search(1, 0);
    printf("%d\n", n * m - mi);
  }
}
