#include <bits/stdc++.h>
using namespace std;
int main() {
  long long n, m, k;
  while (cin >> n >> m >> k) {
    if (k > n + m - 2) {
      puts("-1");
      continue;
    }
    if (k == n + m - 2) {
      puts("1");
      continue;
    }
    if (k == 1) {
      cout << max(n / 2 * m, m / 2 * n) << endl;
      continue;
    }
    long long ans = 0;
    long long tmp = (long long)sqrt(n + .5);
    for (long long i = 1; i <= tmp; ++i) {
      if (k - i + 2 > 0) ans = max(ans, n / i * ((m / (k - i + 2))));
      int ii = n / i;
      if (k - ii + 2 > 0) ans = max(ans, n / ii * ((m / (k - ii + 2))));
    }
    swap(n, m);
    tmp = (long long)sqrt(n + .5);
    for (long long i = 1; i <= tmp; ++i) {
      if (k - i + 2 > 0) ans = max(ans, n / i * ((m / (k - i + 2))));
      int ii = n / i;
      if (k - ii + 2 > 0) ans = max(ans, n / ii * ((m / (k - ii + 2))));
    }
    cout << ans << endl;
  }
  return 0;
}
