#include <bits/stdc++.h>
using namespace std;
long long n, m, k;
long long work() {
  if (m + n - 2 < k) return -1;
  if (m + n - 1 == k)
    return 1;
  else {
    long long k1, k2, s1, s2, s;
    k2 = min(k, m - 1);
    k1 = k - k2;
    s = n / (k1 + 1) * (m / (k2 + 1));
    k1 = min(k, n - 1);
    s1 = n / (k1 + 1);
    k2 = k - k1;
    s2 = m / (k2 + 1);
    s = max(s1 * s2, s);
    return s;
  }
}
int main() {
  while (~scanf("%lld%lld%lld", &n, &m, &k)) {
    cout << work() << endl;
  }
  return 0;
}
