#include <bits/stdc++.h>
using namespace std;
int main() {
  long long n, m, k, i, j;
  scanf("%I64d %I64d %I64d", &n, &m, &k);
  if (k > m + n - 2)
    printf("-1\n");
  else {
    long long tp = k / 2, ans = -1;
    for (i = max(tp - 10, (long long)0); i <= min(k, tp + 10); i++) {
      if (i + 1 <= n && (k - i + 1) <= m) {
        long long a = n / (i + 1), b = m / (k - i + 1);
        ans = max(ans, a * b);
      }
    }
    if (n - 1 <= k) ans = max(ans, m / (k - n + 2));
    if (m - 1 <= k) ans = max(ans, n / (k - m + 2));
    if (m - 1 > k) ans = max(ans, n * (m / (k + 1)));
    if (n - 1 > k) ans = max(ans, m * (n / (k + 1)));
    printf("%I64d\n", ans);
  }
  return 0;
}
