#include #include int main() { intmax_t R, C; scanf("%jd %jd", &R, &C); if (R == C) { if (R == 2) return puts("0"), 0; return !printf("%jd\n", R-1); } else { printf("%jd\n", (R*C+1)/2-1); } }