#include <bits/stdc++.h>
using namespace std;
int main() {
  long long n, m, k;
  cin >> n >> m >> k;
  if (n + m - 2 < k) {
    printf("-1\n");
    return 0;
  }
  long long ans = 0, que, eid, j;
  for (long long i = 1; i * i <= n; i++) {
    if (k < i - 1) continue;
    que = n / i;
    eid = m / (k - i + 2);
    ans = max(que * eid, ans);
    j = n / i;
    if (k < j - 1) continue;
    que = n / j;
    eid = m / (k - j + 2);
    ans = max(que * eid, ans);
  }
  swap(n, m);
  for (long long i = 1; i * i <= n; i++) {
    if (k < i - 1) continue;
    que = n / i;
    eid = m / (k - i + 2);
    ans = max(que * eid, ans);
    j = n / i;
    if (k < j - 1) continue;
    que = n / j;
    eid = m / (k - j + 2);
    ans = max(que * eid, ans);
  }
  cout << ans << endl;
  return 0;
}
