#include <bits/stdc++.h>
using namespace std;
const int MOD = (int)1e9 + 7;
const int MAX = 1e6;
long long int check(long long int n, long long int m, long long int k) {
  long long int x = n, y = m;
  if (k >= n - 1) {
    x = 1;
    k -= (n - 1);
  } else {
    x = n / (k + 1);
    k = 0;
  }
  if (k) {
    if (k >= m - 1) {
      y = 1;
    } else {
      y = m / (k + 1);
    }
  }
  return x * y;
}
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  long long int n, m, k, x, y;
  cin >> n >> m >> k;
  if ((n - 1) + (m - 1) < k)
    cout << "-1" << endl;
  else
    cout << max(check(n, m, k), check(m, n, k)) << endl;
  return 0;
}
