#include <bits/stdc++.h>
using namespace std;
void do_nothing() {}
long long n, m, k;
long long go(long long nsiz) {
  long long maxk1 = (n / nsiz) - 1;
  int k1 = min(maxk1, k);
  int k2 = k - k1;
  int mch = k2 + 1;
  if (mch > m) return -1;
  return (n / (k1 + 1)) * (m / mch);
}
void solve() {
  cin >> n >> m >> k;
  if (n > m) swap(n, m);
  long long ans = -1;
  for (int i = 1; i * i <= n; ++i) {
    ans = max(ans, go(i));
    ans = max(ans, go(n / i));
  }
  cout << ans << "\n";
}
int main() {
  solve();
  return 0;
}
