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