#include <bits/stdc++.h>
using namespace std;
bool comp(int a, int b) { return (a > b); }
int gcd(int a, int b) {
  if (b == 0)
    return a;
  else
    return gcd(b, a % b);
}
int main(void) {
  long long int n, m, k;
  cin >> n >> m >> k;
  if (k > (n + m - 2)) {
    cout << "-1";
    return 0;
  }
  long long int ans;
  if (m > n) swap(n, m);
  if (k <= m - 1)
    ans = max(m / (k + 1) * n, n / (k + 1) * m);
  else if (k <= n - 1)
    ans = n / (k + 1) * m;
  else
    ans = m / (k - n + 2);
  cout << ans;
  return 0;
}
