#include <bits/stdc++.h>
int main() {
  int n, m;
  scanf("%d%d", &n, &m);
  if (n > m) {
    int t = n;
    n = m;
    m = t;
  }
  if (n == 1) {
    printf("%d\n", m - m / 3 - (m % 3 == 0 ? 0 : 1));
  } else if (n == 2) {
    printf("%d\n", m * n - 1 - m / 2);
  } else if (n == 3) {
    printf("%d\n", 2 * m + (m - 1) / 4);
  } else if (n == 4) {
    printf("%d\n", m * 3 - 1 + (m == 4 || m == 7 || m == 8 || m == 10));
  } else if (n == 5) {
    printf("%d\n", 4 * m - 1 - (m / 4));
  } else {
    puts("26");
  }
  return 0;
}
