Загрузка данных


n, m, k = map(int, input().split())

lo = []
hi = []

for d in range(n):
    place = k - 1 + d
    row = place // m
    col = place % m
    if row == len(lo):
        lo.append(col)
        hi.append(col)
    else:
        hi[row] = col

rows = len(lo)
best = 0

for top in range(rows):
    left = lo[top]
    right = hi[top]
    for bottom in range(top, rows):
        left = max(left, lo[bottom])
        right = min(right, hi[bottom])
        if left > right:
            break
        height = bottom - top + 1
        width = right - left + 1
        best = max(best, height * width)

print(best)