#include <bits/stdc++.h>
using namespace std;
using ll = long long;
int main(int argc, char const* argv[]) {
  ll n, m, k;
  cin >> n >> m >> k;
  if (n + m - 2 < k) {
    cout << -1 << endl;
    return 0;
  }
  if (m > n) swap(n, m);
  if (k >= n - 1) {
    cout << m / (k - (n - 1) + 1) << endl;
    return 0;
  }
  ll ans = max(n * (m / (k + 1)), m * (n / (k + 1)));
  cout << ans << endl;
  return 0;
}
