#include <bits/stdc++.h>
using namespace std;
long long n, m, k, res;
int main() {
  std::ios::sync_with_stdio(false);
  cin >> m >> n >> k;
  if (m - 1 + n - 1 < k) {
    cout << "-1" << endl;
    return 0;
  }
  long long x = max(0LL, k - n + 1LL);
  res = max(res, (m / (x + 1)) * (n / (k - x + 1)));
  x = (min(k, m - 1));
  res = max(res, (m / (x + 1)) * (n / (k - x + 1)));
  cout << res << endl;
  return 0;
}
