#include <bits/stdc++.h>
using namespace std;
long long int mod = 1e9 + 7;
int inf = 2e9;
long long int linf = 1000ll * 1000 * 1000 * 1000 * 1000 * 1000;
const int maxn = 1e5 + 200;
queue<pair<long long int, long long int> > q;
long long int ans;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  long long int n, m;
  cin >> n >> m;
  long long int k;
  cin >> k;
  if (k > m + n - 2) {
    cout << -1;
    return 0;
  }
  long long int u = 0, l = 0;
  u = min(m - 1, k);
  l = k - u;
  ans = max(ans, ((m / (u + 1)) * (n / (l + 1))));
  l = min(n - 1, k);
  u = k - l;
  ans = max(ans, ((m / (u + 1)) * (n / (l + 1))));
  cout << ans;
  return 0;
}
