#include <bits/stdc++.h>
const long double pi = cos(-1);
using namespace std;
long long n, m, k;
long long Cacl(long long p, long long n, long long m, long long k) {
  if (p > k) return 0;
  return (n / (p + 1)) * (m / (k - p + 1));
}
int main() {
  cin >> n >> m >> k;
  long long res = max(n / (k + 1) * m, m / (k + 1) * n);
  for (int i = 1; i * i <= n; i++) {
    int x = n / i;
    res = max(res, max(Cacl(x - 1, n, m, k), Cacl(i - 1, n, m, k)));
  }
  if (res == 0)
    cout << -1;
  else
    cout << res;
  return 0;
}
