#include <bits/stdc++.h>
inline int min(int a, int b) { return a < b ? a : b; }
const int M = 42;
const int N = M * 42;
int L[N], R[N], U[N], D[N], S[M], hash[M];
void init(int n, int m) {
  L[0] = R[0] = U[0] = D[0] = 0;
  S[0] = 999999999;
  for (int i = 1; i <= m; i++) {
    L[i] = 0;
    R[i] = R[0];
    L[R[0]] = i;
    R[0] = i;
    U[i] = D[i] = i;
    S[i] = 0;
  }
  for (int i = 1; i <= n; i++) {
    int j = i * M;
    U[j] = 0;
    D[j] = D[0];
    U[D[0]] = j;
    D[0] = j;
    L[j] = R[j] = j;
  }
}
void insert(int x, int y) {
  S[y]++;
  int z = x * M + y;
  int p = y;
  U[z] = p;
  D[z] = D[p];
  U[D[p]] = z;
  D[p] = z;
  int q = x * M;
  L[z] = q;
  R[z] = R[q];
  L[R[q]] = z;
  R[q] = z;
}
void remove(int y) {
  for (int i = D[y]; i != y; i = D[i]) {
    L[R[i]] = L[i];
    R[L[i]] = R[i];
  }
}
void resume(int y) {
  for (int i = U[y]; i != y; i = U[i]) {
    L[R[i]] = i;
    R[L[i]] = i;
  }
}
int atLeast() {
  int ret = 0;
  memset(hash, false, sizeof(hash));
  for (int c = R[0]; c != 0; c = R[c]) {
    if (hash[c] == false) {
      hash[c] = true;
      ret++;
      for (int i = D[c]; i != c; i = D[i]) {
        for (int j = R[i]; j != i; j = R[j]) {
          hash[j % M] = true;
        }
      }
    }
  }
  return ret;
}
bool DFS(int d, int ans) {
  if (R[0] == 0) {
    return true;
  } else if (d + atLeast() > ans) {
    return false;
  } else {
    int c = 0;
    for (int i = R[0]; i != 0; i = R[i]) {
      if (R[i] < R[c]) {
        c = i;
      }
    }
    for (int i = D[c]; i != c; i = D[i]) {
      remove(i);
      for (int j = R[i]; j != i; j = R[j]) {
        if (j % M) {
          remove(j);
        }
      }
      bool ret = DFS(d + 1, ans);
      for (int j = L[i]; j != i; j = L[j]) {
        if (j % M) {
          resume(j);
        }
      }
      resume(i);
      if (ret) {
        return true;
      }
    }
    return false;
  }
}
int dx[5] = {+0, +0, +0, -1, +1};
int dy[5] = {+0, -1, +1, +0, +0};
void build(int n, int m) {
  init(n * m, n * m);
  for (int i = 0; i < n; i++) {
    for (int j = 0; j < m; j++) {
      int a = i * m + j;
      for (int k = 0; k < 5; k++) {
        int ii = i + dx[k];
        int jj = j + dy[k];
        if (0 <= ii && ii < n && 0 <= jj && jj < m) {
          int b = ii * m + jj;
          insert(a + 1, b + 1);
        }
      }
    }
  }
}
int doIt() {
  int l = 1;
  int r = M;
  while (l <= r) {
    int m = (l + r) >> 1;
    bool tmp = DFS(0, m);
    if (tmp) {
      r = m - 1;
    } else {
      l = m + 1;
    }
  }
  return l;
}
int main() {
  int n, m;
  while (scanf("%d %d", &n, &m) != EOF) {
    build(n, m);
    printf("%d\n", n * m - doIt());
  }
  return 0;
}
