#include <bits/stdc++.h>
int main() {
  int n, m, k;
  scanf("%d %d %d", &n, &m, &k);
  if (k > n + m - 2) return printf("-1"), 0;
  int l = 1;
  long long Max = 0;
  k += 2;
  while (l <= n && l <= k) {
    int r = n / (n / l);
    Max = std::max(Max, 1ll * (n / l) * (m / (std::max(k - r, 1))));
    l = r + 1;
  }
  printf("%lld", Max);
  return 0;
}
