#include <bits/stdc++.h>
using namespace std;
int n, m, k;
long long cut(int x) {
  if (x >= n || (k - x) >= m) return -1;
  if (x < 0 || (k - x) < 0) return -1;
  long long res = n / (x + 1);
  res *= m / (k - x + 1);
  return res;
}
void solve() {
  if (k > n + m - 2) {
    printf("-1\n");
    return;
  }
  int s = sqrt(n) + 2;
  long long res = 1;
  for (int i = 0; i < s; ++i) {
    long long tmp = cut(i);
    if (tmp > res) res = tmp;
  }
  for (int i = 1; i < s; ++i) {
    long long tmp = cut(min(k, n / i - 1));
    if (tmp > res) res = tmp;
  }
  printf("%I64d\n", res);
}
int main() {
  if (scanf("%d%d%d", &n, &m, &k) != EOF) {
    solve();
  }
  return 0;
}
