#include <bits/stdc++.h>
using namespace std;
long long n = 7, m = 4, k = 1;
long long calc(long long nk, long long mk) {
  return (n / (nk + 1)) * (m / (mk + 1));
}
int main() {
  cin >> n >> m >> k;
  if (k > n + m - 2) {
    cout << -1;
    return 0;
  }
  long long nk = min(k, n - 1);
  long long mk = min(k, m - 1);
  long long a = calc(nk, k - nk);
  long long b = calc(k - mk, mk);
  cout << max(a, b);
  return 0;
}
