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