#include <bits/stdc++.h>
using namespace std;
int main() {
  long long N, M, K;
  scanf("%I64d%I64d%I64d", &N, &M, &K);
  if (K > N + M - 2)
    printf("-1\n");
  else {
    long long maxn, maxm;
    if (K > N - 1) {
      maxn = M / (K - N + 2);
    } else
      maxn = N / (K + 1) * M;
    if (K > M - 1) {
      maxm = N / (K - M + 2);
    } else
      maxm = M / (K + 1) * N;
    printf("%I64d\n", max(maxn, maxm));
  }
}
