#include <bits/stdc++.h>
using namespace std;
int main() {
  std::iostream::sync_with_stdio(false);
  long long int n, m, k;
  cin >> n >> m >> k;
  long long int x = k / 2;
  if (m + n - 2 < k)
    cout << "-1" << endl;
  else {
    int p = k / 2;
    long long ans1 = (n / (p + 1)) * (m / (k - p + 1));
    long long ans2 = (n / (k - p + 1) * (m / (p + 1)));
    long long ans = max(ans1, ans2);
    p = max(k / 2 - 1, (long long)0);
    ans1 = (n / (p + 1)) * (m / (k - p + 1));
    ans2 = (n / (k - p + 1) * (m / (p + 1)));
    ans = max(ans, max(ans1, ans2));
    p = k / 2 + 1;
    ans1 = (n / (p + 1)) * (m / (k - p + 1));
    ans2 = (n / (k - p + 1) * (m / (p + 1)));
    ans = max(ans, max(ans1, ans2));
    p = min(n - 1, k);
    ans1 = (n / (p + 1)) * (m / (k - p + 1));
    ans2 = (n / (k - p + 1) * (m / (p + 1)));
    ans = max(ans, max(ans1, ans2));
    p = min(m - 1, k);
    ans1 = (n / (p + 1)) * (m / (k - p + 1));
    ans2 = (n / (k - p + 1) * (m / (p + 1)));
    ans = max(ans, max(ans1, ans2));
    cout << ans << endl;
  }
  return 0;
}
