#include <bits/stdc++.h>
using namespace std;
const long long INF = 0x3f3f3f3f;
const long long MOD = 10000;
const double PI = acos(-1.0);
int main() {
  long long n, m, k;
  while (cin >> n >> m >> k) {
    if (k > n + m - 2) {
      printf("-1\n");
      return 0;
    }
    long long res = 0;
    long long x = 0, y = k;
    if (k > m - 1) {
      y = m - 1;
      x = k - y;
    }
    long long tmp = (n / (x + 1)) * (m / (y + 1));
    res = max(res, tmp);
    x = k, y = 0;
    if (k > n - 1) {
      x = n - 1;
      y = k - x;
    }
    tmp = (n / (x + 1)) * (m / (y + 1));
    res = max(res, tmp);
    cout << res << endl;
  }
}
