#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, m, k;
  while (scanf("%d%d%d", &n, &m, &k) == 3) {
    if (k > n + m - 2)
      puts("-1");
    else {
      long long ANS = -1;
      for (long long i = 1; i <= n; i++) {
        long long upper = n / i;
        i = n / upper;
        long long j = max(k - i + 1, (long long)0);
        if ((long long)upper * (m / (j + 1)) > ANS) {
          ANS = (long long)upper * (m / (j + 1));
        }
      }
      cout << ANS << endl;
    }
  }
  return 0;
}
