#include <bits/stdc++.h>
using namespace std;
long long calc(long long n, long long m, long long k, long long h) {
  return (n / (h + 1)) * (m / (k - h + 1));
}
int main() {
  cin.sync_with_stdio(0);
  cout.setf(ios::floatfield, ios::fixed);
  cout.precision(8);
  int n, m, k;
  cin >> n >> m >> k;
  if (k > n + m - 2) {
    cout << -1 << endl;
  } else {
    long long res = 0;
    res = max(res, calc(n, m, k, min(n - 1, k)));
    res = max(res, calc(n, m, k, k - min(m - 1, k)));
    cout << res << endl;
  }
  return 0;
}
