#include <bits/stdc++.h>
using namespace std;
const int M = 55;
int main() {
  int i, j;
  long long n, m, k, s, t = 0;
  int flag = 1;
  scanf("%I64d%I64d%I64d", &n, &m, &k);
  if (n + m - 2 < k) {
    printf("-1\n");
    flag = 0;
  }
  if (flag) {
    for (i = 0; i < 2; ++i) {
      if (k < n - 1)
        s = (n / (k + 1)) * m;
      else
        s = m / (k - n + 2);
      if (s >= t) t = s;
      swap(n, m);
    }
    printf("%I64d\n", t);
  }
}
