#include <bits/stdc++.h>
using namespace std;
long long n, m, k;
long long f(long long x) { return (n / (x + 1LL)) * (m / (k - x + 1LL)); }
int main() {
  cin >> n >> m >> k;
  if (n + m - 2LL < k)
    cout << -1;
  else {
    long long ans = 0;
    for (int i = (int)max(0LL, k - (m - 1));
         i <= (int)min(min(n - 1LL, k), 10000000LL); i++)
      ans = max(ans, f(i));
    for (int i = (int)max(0LL, k - (n - 1));
         i <= (int)min(min(m - 1LL, k), 10000000LL); i++)
      ans = max(ans, f(k - i));
    if (k >= n - 1) ans = max(ans, f(n - 1));
    if (k >= m - 1) ans = max(ans, f(k - (m - 1)));
    cout << ans;
  }
  return 0;
}
