#include <bits/stdc++.h>
using namespace std;
int main() {
  long long r, rx, c, cx, k, kx, nR, nC, mx = -1;
  cin >> r >> c >> k;
  rx = r, cx = c, kx = k;
  if ((r - 1) + (c - 1) < k) {
    cout << -1;
    return 0;
  }
  nR = r, nC = c;
  if (k >= r) {
    nR = 1;
    k = k - (r - 1);
    nC = c / (k + 1);
    mx = max(mx, nC * nR);
  } else {
    nR = r / (k + 1);
    mx = max(mx, nC * nR);
  }
  r = rx, c = cx, k = kx;
  nR = r, nC = c;
  if (k >= c) {
    nC = 1;
    k = k - (c - 1);
    nR = r / (k + 1);
    mx = max(mx, nC * nR);
  } else {
    nC = c / (k + 1);
    mx = max(mx, nC * nR);
  }
  cout << mx;
  return 0;
}
