#include <iostream>
#include <algorithm>
using namespace std;

unsigned long long rlaev(unsigned long long n, unsigned long long m) {
	if (n <= 1 && m<=1) return 0;
	unsigned long long ans1 = rlaev(max(n, m)-1, min(n, m));
	unsigned long long ans2 = (min(n,m)%2==0?min(n, m)/2*(min(n, m)+1):min(n, m)*((min(n, m)+1)/2))-1;
	return n*m+ans1+ans2;
}

int main() {
	int n, m;
	cin >> n >> m;
	cout << n*m + rlaev(n, m);
}
