#include <bits/stdc++.h>
using namespace std;
const int M = 100 + 4, Inf = 1e9 + 10;
long long n, m, k;
long long f(long long x) { return (n / x) * (m / (k - x + 2)); }
int main() {
  ios::sync_with_stdio(false);
  cin >> n >> m >> k;
  long long ans = 0;
  if (n + m - 2 < k) {
    cout << -1 << endl;
    return 0;
  }
  for (long long i = 1; i * i <= n; i++) {
    if (i - 1 <= k) ans = max(ans, f(i));
    if (n / i - 1 <= k) ans = max(ans, f(n / i));
  }
  swap(n, m);
  for (long long i = 1; i * i <= n; i++) {
    if (i - 1 <= k) ans = max(ans, f(i));
    if (n / i - 1 <= k) ans = max(ans, f(n / i));
  }
  cout << ans << endl;
  return 0;
}
