#include <bits/stdc++.h>
using namespace std;
int n, m, k;
long long f(int w) {
  int h = k - w;
  int dw = n / (w + 1);
  int dh = m / (h + 1);
  return (long long)dw * dh;
}
int main() {
  ios_base::sync_with_stdio(0);
  cin >> n >> m >> k;
  if (n + m - 2 < k) {
    cout << -1 << endl;
    return 0;
  }
  long long la, lb, r = 1;
  la = f(min(n - 1, k));
  lb = f(max(k - m + 1, 0));
  r = (la > lb ? la : lb);
  cout << r << endl;
  return 0;
}
