#include <bits/stdc++.h>
using namespace std;
int main() {
  int a[6][45] = {{0,  1,  2,  2,  3,  4,  4,  5,  6,  6,  7,  8,  8,  9,
                   10, 10, 11, 12, 12, 13, 14, 14, 15, 16, 16, 17, 18, 18,
                   19, 20, 20, 21, 22, 22, 23, 24, 24, 25, 26, 26},
                  {0,  2,  4,  5,  7,  8,  10, 11, 13, 14,
                   16, 17, 19, 20, 22, 23, 25, 26, 28, 29},
                  {0, 0, 6, 8, 11, 13, 15, 17, 20, 22, 24, 26, 29},
                  {0, 0, 0, 12, 14, 17, 21, 24, 26, 30},
                  {0, 0, 0, 0, 18, 22, 26, 29},
                  {0, 0, 0, 0, 0, 26}};
  int m, n;
  scanf("%d%d", &m, &n);
  if (n < m) swap(n, m);
  printf("%d\n", a[m - 1][n - 1]);
  return 0;
}
