#include <bits/stdc++.h>
using namespace std;
inline int input() {
  int ret = 0;
  bool isN = 0;
  char c = getchar();
  while (c < '0' || c > '9') {
    if (c == '-') isN = 1;
    c = getchar();
  }
  while (c >= '0' && c <= '9') {
    ret = ret * 10 + c - '0';
    c = getchar();
  }
  return isN ? -ret : ret;
}
inline void output(int x) {
  if (x < 0) {
    putchar('-');
    x = -x;
  }
  int len = 0, data[11];
  while (x) {
    data[len++] = x % 10;
    x /= 10;
  }
  if (!len) data[len++] = 0;
  while (len--) putchar(data[len] + 48);
  putchar('\n');
}
long long n, m, k;
int main() {
  cin >> n >> m >> k;
  if ((n - 1) + (m - 1) < k) {
    puts("-1");
    return 0;
  }
  if ((n - 1) + (m - 1) == k) {
    puts("1");
    return 0;
  }
  long long ans1 = 0, ans2 = 0;
  if ((m - 1) >= k)
    ans1 = (m / (k + 1) * n);
  else {
    ans2 = n / (k - (m - 1) + 1);
  }
  long long ans3 = 0, ans4 = 0;
  if ((n - 1) >= k) {
    ans3 = n / (k + 1) * m;
  } else {
    ans4 = m / (k - (n - 1) + 1);
  }
  cout << max(max(ans1, ans2), max(ans3, ans4)) << endl;
}
