#include <bits/stdc++.h>
using namespace std;
int s[1610], mat[1610][1610], ansq[1610], u[1610 * 1610], d[1610 * 1610],
    l[1610 * 1610], r[1610 * 1610], c[1610 * 1610], row[1610 * 1610];
int step[][2] = {{0, 0}, {0, 1}, {0, -1}, {1, 0}, {-1, 0}};
void build(int n, int m) {
  r[0] = 1;
  l[0] = m;
  for (int i = 1; i <= m; i++) {
    l[i] = i - 1;
    r[i] = (i + 1) % (m + 1);
    c[i] = d[i] = u[i] = i;
    s[i] = 0;
  }
  int size = m;
  for (int i = 1; i <= n; i++) {
    int rp = 0;
    for (int j = 1; j <= m; j++)
      if (mat[i - 1][j - 1]) {
        size++;
        d[u[j]] = size;
        u[size] = u[j];
        d[size] = j;
        u[j] = size;
        if (!rp) {
          rp = size;
          l[size] = size;
          r[size] = size;
        } else {
          l[size] = l[rp];
          r[size] = rp;
          r[l[rp]] = size;
          l[rp] = size;
        }
        c[size] = j;
        s[j]++;
      }
  }
}
inline void coverc(int pc) {
  for (int i = d[pc]; i != pc; i = d[i]) {
    r[l[i]] = r[i];
    l[r[i]] = l[i];
  }
}
inline void resumec(int pc) {
  for (int i = u[pc]; i != pc; i = u[i]) {
    l[r[i]] = i;
    r[l[i]] = i;
  }
}
bool vis[1610];
int hf() {
  int cnt = 0;
  memset(vis, 0, sizeof(vis));
  for (int i = r[0]; i; i = r[i])
    if (!vis[i]) {
      cnt++;
      vis[i] = 1;
      for (int j = d[i]; j != i; j = d[j])
        for (int k = r[j]; k != j; k = r[k]) vis[c[k]] = 1;
    }
  return cnt;
}
int cut, nextcut;
bool dfs(int dep) {
  if (!r[0]) return true;
  int pc, mins = 1610;
  for (int i = r[0]; i; i = r[i])
    if (mins > s[i]) {
      mins = s[i];
      pc = i;
    }
  for (int rp = d[pc]; rp != pc; rp = d[rp]) {
    coverc(rp);
    for (int i = r[rp]; i != rp; i = r[i]) coverc(i);
    int tmp = dep + 1 + hf();
    if (tmp > cut)
      nextcut = min(tmp, nextcut);
    else if (dfs(dep + 1))
      return true;
    for (int i = l[rp]; i != rp; i = l[i]) resumec(i);
    resumec(rp);
  }
  return false;
}
int IDAstar(int n) {
  cut = hf();
  nextcut = n;
  memset(vis, 0, sizeof(vis));
  while (!dfs(0)) {
    cut = nextcut;
    nextcut = n;
  }
  return cut;
}
int n, m;
int getid(int i, int j) { return i * m + j; }
int main() {
  while (scanf("%d %d", &n, &m) == 2) {
    memset(mat, 0, sizeof(mat));
    for (int i = 0; i < n; i++) {
      for (int j = 0; j < m; j++) {
        int id = getid(i, j);
        for (int k = 0; k < 5; k++) {
          int ty = step[k][0] + i;
          int tx = step[k][1] + j;
          if (ty < n && ty >= 0 && tx >= 0 && tx < m) {
            mat[id][getid(ty, tx)] = 1;
          }
        }
      }
    }
    build(n * m, n * m);
    int ans = IDAstar(n * m);
    printf("%d\n", n * m - ans);
  }
  return 0;
}
