#include <bits/stdc++.h>
using namespace std;
const int INF = 1 << 30;
const double EPS = 1e-7;
long long N, M, K;
long long predicate(long long v) { return (M / (v + 1)) * (N / (K - v + 1)); }
long long solve1() {
  long long ans = 0;
  for (int i = max(0LL, K - (N - 1)); i < M && i <= K; i++) {
    ans = max(ans, predicate(i));
  }
  return ans;
}
long long solve() {
  return max(predicate(max(0LL, K - (N - 1))), predicate(min(M - 1, K)));
}
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cin >> N >> M >> K;
  if (K > N - 1 + M - 1)
    cout << -1 << endl;
  else
    cout << solve() << endl;
  return 0;
}
