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