#include <bits/stdc++.h>
using namespace std;
long long N, M, K;
int main() {
  cin >> N >> M >> K;
  if (K > N + M - 2) {
    cout << -1 << endl;
    return 0;
  }
  long long ans = (N / (min(K, N - 1) + 1)) * (M / (max(0LL, K - N + 1) + 1));
  swap(N, M);
  ans = max(ans, (N / (min(K, N - 1) + 1)) * (M / (max(0LL, K - N + 1) + 1)));
  cout << ans << endl;
  return 0;
}
