#include <bits/stdc++.h>
using namespace std;
long long n, m, k, ans, ans2;
int main() {
  cin >> n >> m >> k;
  if (k > n + m - 2) {
    cout << -1 << endl;
    return 0;
  }
  ans = 0;
  long long _, __ = 0;
  ans = (n / (min(k, n - 1) + 1)) * (m / (max(__, k - n + 1) + 1));
  ans2 = (n / (max(__, k - m + 1) + 1)) * (m / (min(k, m - 1) + 1));
  cout << max(ans, ans2) << endl;
  return 0;
}
