#include <bits/stdc++.h>
using namespace std;
const int LIMIT = 1000;
long long n, m, k;
long long calc(long long a) {
  long long b = k - a;
  return (n / (a + 1)) * (m / (b + 1));
}
int cnt;
int main() {
  cin >> n >> m >> k;
  if (n + m - 2 < k) {
    cout << "-1" << endl;
    return 0;
  }
  if (n > m) swap(n, m);
  long long l = max(0LL, k - (m - 1)), r = min(k, n - 1);
  long long ans = 0;
  ans = max(calc(l), calc(r));
  cout << ans << endl;
  return 0;
}
