#include <bits/stdc++.h>
using namespace std;
template <typename T>
T BigMod(T b, T p, T m) {
  if (p == 0) return 1;
  if (p % 2 == 0) {
    T s = BigMod(b, p / 2, m);
    return ((s % m) * (s % m)) % m;
  }
  return ((b % m) * (BigMod(b, p - 1, m) % m)) % m;
}
template <typename T>
T ModInv(T b, T m) {
  return BigMod(b, m - 2, m);
}
template <typename T>
T gcd(T a, T b) {
  if (!b) return a;
  return gcd(b, a % b);
}
int main() {
  long long i, t, tot, n, j, q, k, st, ed, val, p, x, y, z, sum, dif, idx, ind,
      sz, m, l, r, res;
  scanf("%lld %lld %lld", &n, &m, &k);
  if ((n - 1) + (m - 1) < k)
    printf("-1\n");
  else {
    val = 0;
    val = max(val, n * (m / (k + 1)));
    val = max(val, m * (n / (k + 1)));
    if (n <= k) val = max(val, m / (k + 2 - n));
    if (m <= k) val = max(val, n / (k + 2 - m));
    printf("%lld\n", val);
  }
  return 0;
}
