#include <bits/stdc++.h>
using namespace std;
const long long maxn = 100000 * 3 + 2, inf = maxn * maxn;
long long n, m, k, ans;
int main() {
  ios::sync_with_stdio(false);
  cin >> n >> m >> k;
  if (k > n + m - 2) {
    cout << -1 << endl;
    return 0;
  }
  for (int i = 1; i <= sqrt(n); i++) {
    long long x = n / i;
    if (k + 2 > i) ans = max(ans, x * (m / (k - i + 2)));
    if (k + 2 > x) ans = max(ans, i * (m / (k - x + 2)));
  }
  for (int i = 1; i <= sqrt(m); i++) {
    long long x = m / i;
    if (k + 2 > i) ans = max(ans, x * (n / (k - i + 2)));
    if (k + 2 > x) ans = max(ans, i * (n / (k - x + 2)));
  }
  cout << ans << endl;
  return 0;
}
