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