/* Dennis Waldherr */
#include <stdio.h>

typedef unsigned long long ul;

int main() {
	int n, m, c;
	FILE *f = stdin;
	while (fscanf(f, "%d %d %d", &n, &m, &c) == 3 && n != 0) {
		ul sum = 0;
		int i;
		for (i = m; i > 7; i--) {
			int cc = (m - i + c) % 2;
			if (cc) {
				sum += (n - 6) / 2;
			} else {
				sum += (n - 7) / 2;
			}
		}
		printf("%llu\n", sum);
	}
	return 0;
}
