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