#include <bits/stdc++.h>
time_t waktu = clock();
void gettime() {
  printf("\nTime : %.2lf", (clock() - waktu) / double(CLOCKS_PER_SEC));
}
int comp(int a, int b) { return (a > b); }
using namespace std;
int main() {
  int n, m, k, x, y;
  long long int hasil = 0, hasil2 = 0;
  scanf("%d %d %d", &n, &m, &k);
  x = k;
  y = k;
  if (k < n) {
    hasil = n;
    hasil /= (k + 1);
    hasil *= m;
  } else {
    k -= n;
    k++;
    hasil = (m / (k + 1));
  }
  if (x < m) {
    hasil2 = m;
    hasil2 /= (x + 1);
    hasil2 *= n;
  } else {
    x -= m;
    x++;
    hasil2 = (n / (x + 1));
  }
  if (y > (n + m - 2))
    printf("-1");
  else
    cout << max(hasil, hasil2);
  return 0;
}
