#include <bits/stdc++.h>
using namespace std;
const int INF = ~0U >> 1;
const int Mod = int(1e9) + 7;
const int maxN = 200000 + 100;
template <class T>
void tension(T &a, const T &b) {
  if (b < a) a = b;
}
template <class T>
void relax(T &a, const T &b) {
  if (b > a) a = b;
}
int main() {
  long long n, m, k;
  cin >> n >> m >> k;
  if (k > n - 1 + m - 1) {
    puts("-1");
    return 0;
  }
  long long ans = 0;
  if ((n % (k + 1) == 0 && n > k) || (m % (k + 1) == 0 && m > k)) {
    relax(ans, n * m / (k + 1));
    cout << ans << endl;
    return 0;
  }
  for (long long a = 0; a <= k;) {
    if (a + 1 > n) break;
    long long part = n / (a + 1);
    long long nx = n / part - 1;
    nx = min(nx, k);
    long long b = k - nx;
    if (b + 1 <= m) relax(ans, part * (m / (b + 1)));
    a = nx + 1;
  }
  cout << ans << endl;
  return 0;
}
