#include <bits/stdc++.h>
using namespace std;
long long divide(int a, int b, int x) {
  if (a + b - 2 < x) return -1;
  if (a <= x) return divide(b, 1, x - a + 1);
  long long res = 0;
  if (b > x) res = max(res, (long long)a * (long long)(b / (x + 1)));
  res = max(res, (long long)b * (long long)(a / (x + 1)));
  return res;
}
int main() {
  int n, m, k;
  scanf("%d%d%d", &n, &m, &k);
  if (n < m) swap(n, m);
  cout << divide(n, m, k) << '\n';
  return 0;
}
