#include <bits/stdc++.h>
using namespace std;
int main(void) {
  int64_t n, m, k;
  cin >> n >> m >> k;
  if (n + m - 2 - k < 0)
    cout << -1;
  else {
    int64_t rk = k;
    int64_t mxa = 0, mxb = 0;
    if (n - 1 >= k)
      mxa = n / (k + 1) * m;
    else {
      k -= n - 1;
      mxa = m / (k + 1);
    }
    swap(n, m);
    k = rk;
    if (n - 1 >= k)
      mxb = n / (k + 1) * m;
    else {
      k -= n - 1;
      mxb = m / (k + 1);
    }
    cout << max(mxa, mxb);
  }
}
