#include <bits/stdc++.h>
using namespace std;
const long long mod = 1000000007;
const long long INF = 1e18;
const long long MAX = 100001;
void solve() {
  long long n, m, k;
  cin >> n >> m >> k;
  long long cut_horizontal = n - 1;
  long long cut_vertical = m - 1;
  long long min_value = min(cut_horizontal, cut_vertical);
  long long max_value = max(cut_horizontal, cut_vertical);
  if (k > (cut_vertical + cut_horizontal)) {
    cout << "-1" << std::endl;
    return;
  }
  if (k <= min(cut_horizontal, cut_vertical)) {
    long long area1 = (m / (k + 1)) * n;
    long long area2 = (n / (k + 1)) * m;
    long long ans = max(area1, area2);
    cout << ans << std::endl;
    return;
  } else if (k > min_value && k <= max_value) {
    if (n <= m) {
      long long rem1 = k - (n - 1);
      long long div2 = (m / (rem1 + 1));
      long long area1 = div2 * 1;
      long long div1 = n;
      div2 = (m / (k + 1));
      long long area2 = div1 * div2;
      long long ans = max(area1, area2);
      cout << ans << std::endl;
      return;
    } else {
      long long rem1 = k - (m - 1);
      long long div2 = (n / (rem1 + 1));
      long long area1 = div2 * 1;
      long long div1 = m;
      div2 = (n / (k + 1));
      long long area2 = div1 * div2;
      long long ans = max(area1, area2);
      cout << ans << std::endl;
      return;
    }
    return;
  } else {
    long long div1 = 1;
    long long rem1 = k - (n - 1);
    long long div2 = (m / (rem1 + 1));
    long long area1 = div1 * div2;
    rem1 = k - (m - 1);
    div2 = (n / (rem1 + 1));
    long long area2 = 1 * div2;
    long long ans = max(area1, area2);
    cout << ans << std::endl;
    return;
  }
}
int main(int argc, char const *argv[]) {
  solve();
  return 0;
}
