#include <bits/stdc++.h>
using namespace std;
const double PI = 2 * asin(1.0);
const int INF = 1000000000;
const double EPS = 1e-10;
inline int cmp(double x, double y = 0, double tol = EPS) {
  return (x <= y + tol) ? (x + tol < y) ? -1 : 0 : 1;
}
int main() {
  long long n, m, k;
  while (cin >> n >> m >> k) {
    if ((n - 1) + (m - 1) < k)
      cout << "-1" << endl;
    else {
      long long a = min(n - 1, k);
      long long b = k - a;
      long long x = (n / (a + 1)) * (m / (b + 1));
      b = min(m - 1, k);
      a = k - b;
      long long y = (n / (a + 1)) * (m / (b + 1));
      cout << max(x, y) << endl;
    }
  }
  return 0;
}
