#include <bits/stdc++.h>
using namespace std;
const double eps = 1e-8;
const double INF = 1e20;
const double PI = acos(-1.);
const int MXN = 50;
const long long MOD = 1000000007;
const long long N = 1000000;
long long n, m, k;
int main() {
  long long i, j, x, y, ans;
  scanf("%I64d%I64d%I64d", &n, &m, &k);
  if (n + m - 2 < k)
    printf("-1\n");
  else {
    ans = 0;
    x = min(k, n - 1);
    y = k - x;
    ans = (n / (x + 1)) * (m / (y + 1));
    y = min(k, m - 1);
    x = k - y;
    ans = max(ans, (n / (x + 1)) * (m / (y + 1)));
    printf("%I64d\n", ans);
  }
  return 0;
}
