#include <bits/stdc++.h>
using namespace std;
const int maxn = 500010;
long long n, m, k;
long long tmp, cnt, ans;
int main() {
  int T, cas = 1;
  scanf("%lld%lld%lld", &n, &m, &k);
  if (k > n + m - 2)
    puts("-1");
  else {
    ans = 0;
    if (k < n) ans = max(ans, m * (n / (k + 1)));
    if (k < m) ans = max(ans, n * (m / (k + 1)));
    if (k >= m) ans = max(ans, n / (k - m + 2));
    if (k >= n) ans = max(ans, m / (k - n + 2));
    printf("%lld\n", ans);
  }
}
