from math import *  
n = int(input()) 
m = int(input()) 
s = int(input()) 
ans = 0 
d = [x for x in range(1,int(sqrt(s))+2) if s%x==0] 
d = d + [s//x for x in d] 
a = max([(n//x)*(m//(s//x)) for x in d]) 
print(a)

