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.
from math import *
n = int(input())
if n == 1:
    print(1)
elif n == 2:
    print(2)
elif n == 3:
    print(6)
elif n == 4:
    print(12)
elif n % 2 != 0:
    print(n * (n - 1) * (n - 2))
else:
    ans = (n - 2) * (n - 1) * (n - 3)
    k = n - 3
    while k >= 1:
        if gcd(k, n) >= 2:
            break
        ans = max(n * (n - 1) * k, ans)
        k -= 2
    print(ans)
# Code written by Makhkamov
# Code written by Richard
# Richard - my new Nickname!
# I like Python!
# Python - very good language!
# I want solve problems, but I don't have more time.
# Don't waste your time!
# Quote.
# Dreaming is not bad at all, but it is also worth considering the real situation.
# Mistakes are not events that we attract into our lives, no matter how unpleasant they are for us, it is necessary for us to learn what we must learn, no matter what our next step is, it is necessary in order to reach the place where we have chosen the path!
# Never jump to conclusions. Before you do something, think 1000 times. Will it be beneficial or harmful?
# (c) Richard
