#include <bits/stdc++.h>
using namespace std;
void start();
long long fun(int n, int m, int k);
int main() {
  start();
  return 0;
}
void start() {
  int n, m, k;
  cin >> n >> m >> k;
  if (k > (n - 1) + (m - 1)) {
    cout << -1;
  } else {
    long long r1 = fun(n, m, k);
    long long r2 = fun(m, n, k);
    cout << max(r1, r2);
  }
}
long long fun(int n, int m, int k) {
  int a = min(n - 1, k);
  k -= a;
  return (long long)(n / (a + 1)) * (long long)(m / (k + 1));
}
