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