#include <bits/stdc++.h>
using namespace std;
void cout_v(vector<long long>& a) {
  long long n = a.size();
  for (long long i = 0; i < n; i++) {
    cout << a[i];
    if (i != n - 1) {
      continue;
    } else
      cout << endl;
  }
}
void cin_v(vector<int>& a) {
  long long n = a.size();
  for (long long i = 0; i < n; i++) {
    cin >> a[i];
  }
}
int main() {
  long long n, m, k;
  cin >> n >> m >> k;
  if (k > n + m - 2) {
    cout << "-1\n";
    return 0;
  }
  long long maxa = -1;
  if (k > n - 1) {
    maxa = max(maxa, m / (k - n + 2));
  } else {
    maxa = max(maxa, m * (n / (k + 1)));
  }
  if (k > m - 1) {
    maxa = max(maxa, n / (k - m + 2));
  } else {
    maxa = max(maxa, n * (m / (k + 1)));
  }
  cout << maxa << endl;
}
