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.
# import io, os
# input = io.BytesIO(os.read(0,os.fstat(0).st_size)).readline
import sys
# sys.stdin=open('input.txt','r')
# sys.stdout=open('output.txt','w')
input=sys.stdin.readline
# sys.setrecursionlimit(300010)
MOD = 1000000007
MOD2 = 998244353
ii = lambda: int(input().strip('\n'))
si = lambda: input().strip('\n')
dgl = lambda: list(map(int,input().strip('\n')))
f = lambda: map(int, input().strip('\n').split())
il = lambda: list(map(int, input().strip('\n').split()))
ls = lambda: list(input().strip('\n'))
let = 'abcdefghijklmnopqrstuvwxyz'
d=dict()
sieve=[1]*(1000005)
for i in range(2,10**6+4):
    if sieve[i]:
        d[i]=[i]
        for j in range(i*2,10**6+4,i):
            if j in d:
                d[j].append(i)
            else:
                d[j]=[i]
            sieve[j]=0
n=ii()
ans=set(d[n])
cnt=[n]
for i in range(n-1,-1,-1):
    if any(i in ans for i in d[i]):
        continue
    else:
        ans=ans.union(d[i])
        cnt.append(i)
    if len(cnt)==3:
        break
prod=1
for i in cnt:
    prod*=i
print(prod)