#include <bits/stdc++.h>
using namespace std;
int n;
int m;
int k;
vector<int> v;
int main() {
  cin >> n >> m >> k;
  for (long long int i = 1; i * i <= n; i++) {
    v.push_back(i);
    v.push_back(n / i);
  }
  sort(v.begin(), v.end());
  v.erase(unique(v.begin(), v.end()), v.end());
  long long int ans = 0;
  for (int i = 0; i < v.size(); i++) {
    long long int rig = 0;
    if (n % v[i] == 0) {
      rig = n / v[i];
      rig--;
    } else {
      rig = n / v[i];
      rig--;
    }
    rig = min(rig, (long long int)k);
    ans = max(ans, v[i] * (m / (k - rig + 1)));
  }
  if (ans == 0LL) {
    ans = -1;
  }
  printf("%lld\n", ans);
  return 0;
}
