#include <bits/stdc++.h>
using namespace std;
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  long long n, m, k;
  cin >> n >> m >> k;
  if (n > m) swap(n, m);
  set<long long> vals;
  for (long long i = 1; i <= n; ++i) {
    if (vals.count(n / i)) {
      for (long long j = n / i; j >= 1; --j) {
        vals.insert(j);
      }
      break;
    }
    vals.insert(n / i);
  }
  long long res = -1;
  int diff = 2;
  vals.insert(n);
  vals.insert(m);
  for (long long x : vals) {
    for (long long i = n / x - diff; i <= n / x + diff; ++i) {
      if (i < 0 || i >= n) continue;
      long long j = k - i;
      if (j < 0 || j >= m) continue;
      res = max(res, 1LL * (n / (i + 1)) * (m / (j + 1)));
    }
    for (long long i = x - diff; i <= x + diff; ++i) {
      if (i < 0 || i >= n) continue;
      long long j = k - i;
      if (j < 0 || j >= m) continue;
      res = max(res, 1LL * (n / (i + 1)) * (m / (j + 1)));
    }
  }
  if (k < n) res = max(res, 1LL * m * (n / (k + 1)));
  if (k < m) res = max(res, 1LL * n * (m / (k + 1)));
  cout << res << '\n';
  return 0;
}
