#include <bits/stdc++.h>
using namespace std;
inline int getint() {
  char c;
  while ((c = getchar()) < '0' || c > '9')
    ;
  return c - '0';
}
int main() {
  long long n, m, k, i, ans, k1;
  cin >> n >> m >> k;
  if (n > m) {
    swap(n, m);
  }
  k1 = k;
  if (n + m - 2 < k) {
    cout << -1 << "\n";
  } else {
    long long cuts = min(m - 1, k);
    k -= cuts;
    ans = m / (cuts + 1);
    ans = ans * (n / (k + 1));
    cuts = min(n - 1, k1);
    k1 -= cuts;
    long long ans1 = n / (cuts + 1);
    ans1 = (ans1 * (m / (k1 + 1)));
    ans = max(ans, ans1);
    cout << ans << "\n";
  }
  return 0;
}
