#include using namespace std; int main() { int A, B; cin >> A >> B; cout << ((A % 2 == B % 2) ? -1 : (--A * --B) / 2) << "\n"; }