#include <bits/stdc++.h>
int main() {
  long long int n = 0, m = 0, k = 0;
  scanf("%lld%lld%lld", &n, &m, &k);
  long long int ans = 0, ans1 = 0, ans2 = 0;
  if (n + m - 2 < k) {
    ans = -1;
    printf("%lld\n", ans);
    return 0;
  }
  long long int num1 = k < n - 1 ? k : n - 1;
  long long int num2 = k - num1;
  ans1 = (n / (num1 + 1)) * (m / (num2 + 1));
  num2 = k < m - 1 ? k : m - 1;
  num1 = k - num2;
  ans2 = (n / (num1 + 1)) * (m / (num2 + 1));
  ans = ans1 > ans2 ? ans1 : ans2;
  printf("%lld\n", ans);
  return 0;
}
