#include
int main(void) {
int n, m;
std::cin >> n >> m;
int sum = n + m;
for (int i = 3; i <= n; i++)
for (int j = 3; j <= m; j++)
if ((((i + 1) % 2 != 0) || ((j + 1) % 2 != 0))
&& (i != j))
sum++;
std::cout << sum << std::endl;
return 0;
}