#include <bits/stdc++.h>
using namespace std;
long long INF = 1e9;
long long mod = 1e9 + 7;
long long n, m, k, l, r, ans;
long long min(long long a, long long b) { return (a < b) ? a : b; }
long long max(long long a, long long b) { return a + b - min(a, b); }
int main() {
  cin >> n >> m >> k;
  if (n - 1 + m - 1 < k) {
    cout << -1 << endl;
    return 0;
  }
  if (n > m) {
    m = n + m;
    n = m - n;
    m = m - n;
  }
  if (k <= m - 1) {
    ans = n * ((m / (k + 1)));
  } else {
    l = k - m + 1;
    ans = max(ans, (n / (l + 1)) * (m / (k - l + 1)));
  }
  if (k <= n - 1) {
    ans = max(ans, m * (n / (k + 1)));
  } else {
    l = k - n + 1;
    ans = max(ans, (m / (l + 1)) * (n / (k - l + 1)));
  }
  cout << ans << endl;
  return 0;
}
