#include <bits/stdc++.h>
using namespace std;
int main() {
  long long n, m, k;
  cin >> n >> m >> k;
  if ((n + m - 2) < k) {
    cout << "-1"
         << "\n";
    return 0;
  }
  vector<long long> v;
  for (int i = 1; i * i <= n; ++i) v.push_back(i), v.push_back(n / i);
  long long ans = -1;
  for (int i = 0; i < v.size(); ++i) {
    long long r = v[i];
    long long x = max(0ll, k - r + 2);
    if (x > m || (r - 1) > k) continue;
    if (x) x = m / x;
    r = n / r;
    ans = max(ans, r * x);
  }
  v.clear();
  swap(n, m);
  for (int i = 1; i * i <= n; ++i) v.push_back(i), v.push_back(n / i);
  for (int i = 0; i < v.size(); ++i) {
    long long r = v[i];
    long long x = max(0ll, k - r + 2);
    if (x > m || (r - 1) > k) continue;
    if (x) x = m / x;
    r = n / r;
    ans = max(ans, r * x);
  }
  cout << ans << "\n";
}
