#include <bits/stdc++.h>
int a[10][41] = {{},
                 {},
                 {},
                 {3, 4, 4, 5, 6, 7, 7, 8, 9, 10, 10},
                 {4, 6, 7, 7, 8, 10, 10},
                 {7, 8, 9, 11},
                 {10}};
int get(int u, int v) { return u < v ? a[u][v - u] : a[v][u - v]; }
int main() {
  int n, m;
  scanf("%d%d", &n, &m);
  for (int i = 1; i <= 40; i++) {
    a[1][i - 1] = (i + 2) / 3;
    a[2][i - 2] = i / 2 + 1;
  }
  printf("%d", n * m - get(n, m));
}
