#include <bits/stdc++.h>
using namespace std;
const signed long long INF64 = (signed long long)1E18;
const int INF = 1000000000;
const double pi = 3.1415926535897932384626433832795028841971;
int main() {
  ios::sync_with_stdio(false);
  signed long long r, c, k;
  cin >> r >> c >> k;
  if (r + c - 2 < k)
    cout << -1 << endl;
  else {
    signed long long ans = 1;
    ans = max(ans, (c / (k + 1)) * r);
    ans = max(ans, (r / (k + 1)) * c);
    if (k - r + 2 > 0) ans = max(ans, c / (k - r + 2));
    if (k - c + 2 > 0) ans = max(ans, r / (k - c + 2));
    cout << ans << endl;
  }
  return 0;
}
