/* Walter Guttmann */
#include <fstream>
#include <iostream>

using namespace std;

#define in cin

int main() {
  int n, m, c;
  while (in >> n >> m >> c) {
    if (n == 0 && m == 0 && c == 0) break;
    n -= 7;
    m -= 7;
    int x = (n*m+1)/2;
    cout << (c == 1 ? x : n*m-x) << endl;
  }
  return 0;
}

