#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using ii = pair<int, int>;
ll n, m, k;
ll solve() {
  k += 2;
  if (k > n + m) return -1;
  ll p_min = max(1LL, k - m), p_max = min(n, k - 1);
  vector<pair<ll, ll>> q;
  set<ll> t;
  for (ll i = 1; i * i <= n; i++) {
    t.insert(i);
    t.insert(n / i);
  }
  for (ll x : t) q.push_back({x, n / x});
  ll ans = 0;
  for (const auto& p : q)
    if (p.first >= p_min) {
      ll x = min(p.first, p_max);
      ans = max(ans, p.second * (m / (k - x)));
    }
  return ans;
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cin >> n >> m >> k;
  cout << solve() << "\n";
}
