Some days ago, I learned the concept of LCM (least common multiple). I've played with it for several times and I want to make a big number with it.

But I also don't want to use many numbers, so I'll choose three positive integers (they don't have to be distinct) which are not greater than *n*. Can you help me to find the maximum possible least common multiple of these three integers?
The first line contains an integer *n* (1 ≤ *n* ≤ 10<sup class="upper-index">6</sup>) — the *n* mentioned in the statement.
INF = int(1e+6 + 10)
lp = [0] * INF
pr = []
for i in range(2, INF):
    if lp[i] == 0:
        lp[i] = i
        pr.append(i)
    for j in range(len(pr)):
        if not (pr[j] <= lp[i] and i * pr[j] < INF):
            break
        lp[i * pr[j]] = pr[j]
n = int(input())
m = 0
l = 0
r = len(pr)
while l < r:
    m = (l + r) // 2
    if pr[m] > (n - 2): r = m
    else: l = m + 1
r -= 1
print(n * (n - 1) * pr[r])

