#include <bits/stdc++.h>
using namespace std;
int main() {
  long long l, w, k, num1, num2, ans;
  scanf("%I64d%I64d%I64d", &l, &w, &k);
  if (l + w - 2 < k)
    printf("-1\n");
  else {
    num1 = min(l - 1, k);
    num2 = k - num1;
    ans = (l / (num1 + 1)) * (w / (num2 + 1));
    num2 = min(w - 1, k);
    num1 = k - num2;
    ans = max(ans, (l / (num1 + 1)) * (w / (num2 + 1)));
    printf("%I64d\n", ans);
  }
  return 0;
}
