#include <bits/stdc++.h>
using namespace std;
int main() {
  long long int m, n, k;
  long long int ref = 0;
  cin >> m >> n >> k;
  if (k > m + n - 2) {
    cout << "-1";
    return 0;
  }
  long long int c1, c2;
  int ctr = 0;
  while (ctr < 2) {
    if (ctr == 1) {
      long long int temp = m;
      m = n;
      n = temp;
      ctr++;
    }
    if (k > n - 1) {
      c2 = n - 1;
      c1 = k - n + 1;
    } else {
      c2 = k;
      c1 = 0;
    }
    c1++;
    c2++;
    long long int res = (m / c1) * (n / c2);
    ctr++;
    if (res > ref) ref = res;
  }
  cout << ref;
  return 0;
}
