#include <bits/stdc++.h>
#pragma comment(linker, "/STACK:100000000")
using namespace std;
long long a, b, k;
long long get(long long x) {
  if (x < 0 || x > k) return -1;
  if (x >= a) return -1;
  if (k - x >= b) return -1;
  return (a / (x + 1)) * (b / (k - x + 1));
}
int main() {
  scanf("%lld%lld%lld", &a, &b, &k);
  long long i, r = -1;
  r = max(r, get(a - 1));
  r = max(r, get(k - b + 1));
  for (i = -100000; i <= 100000; r = max(r, get(k / 2 + i)), i++)
    ;
  for (i = 0; i <= 100000; r = max(r, get(i)), r = max(r, get(k - i)), i++)
    ;
  printf("%lld\n", r);
  return 0;
}
