#include <bits/stdc++.h>
using namespace std;
long long n, m, k;
long long ans;
int main() {
  cin >> n >> m >> k;
  if (k > n + m - 2) {
    cout << -1 << endl;
    return 0;
  }
  if (k > n - 1) {
    long long x = k;
    x -= (n - 1);
    ans = m / (x + 1);
  } else
    ans = n / (k + 1) * m;
  if (k > m - 1) {
    long long x = k;
    x -= (m - 1);
    ans = max(ans, (n / (x + 1)));
  } else
    ans = max(ans, (m / (k + 1) * n));
  cout << ans << endl;
  return 0;
}
