#include <bits/stdc++.h>
using namespace std;
long long go(long long a, long long b, long long c) {
  if (c > a - 1 + b - 1) {
    return -1;
  }
  long long rem = c - (a - 1);
  if (rem > 0) {
    return 1 * b / (rem + 1);
  } else {
    return a / (c + 1) * b;
  }
}
int main() {
  long long a, b, c;
  cin >> a >> b >> c;
  long long ans = max(go(a, b, c), go(b, a, c));
  cout << ans << endl;
}
