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 copy
import sys
def my_sort(listt,column=0):
    a=column
    if len(listt)<=1:
        return listt
    else:
        mid=len(listt)//2
        return merge(my_sort(listt[:mid],column=a),my_sort(listt[mid:],column=a),column=a)
def merge(listt1,listt2,column):
    i=0
    j=0
    listt=[]
    while i<len(listt1) and j<len(listt2):
        
        if listt1[i][column]<listt2[j][column]:
            listt.append(listt1[i])
            i+=1
        elif listt1[i][column]==listt2[j][column]:
            if listt1[i][column-1]<listt2[j][column-1]:
                listt.append(listt1[i])
                i+=1
            else:
                listt.append(listt2[j])
                j+=1
        
        else:
            listt.append(listt2[j])
            j+=1
    while i<len(listt1):
        listt.append(listt1[i])
        i+=1
    while j<len(listt2):
        listt.append(listt2[j])
        j+=1
    return listt
 
def int_input():
    return int(input())
def list_input():
    return list(map(int,input().split()))
def list_str_input():
    return list(input())
def str_input():
    return input()
def gcd(a,b):
    maxi=max(a,b)
    mini=min(a,b)
    while mini!=0:
        a=maxi%mini
        maxi=mini
        mini=a
    return maxi
 
def binary_search(array,value,initial,final):
    ini=max(0,initial)
    fini=min(len(array),final)
    if ini>fini:
        return False
    while fini-ini>1:
        mid=(ini+fini)//2
        if array[mid]==value:
           return mid
        if array[mid]>value:
            fini=mid
        else:
            ini=mid
    return ini
def binary_insert(array,value):
    if len(array)==0:
        array.append(value)
        return array
    if array[-1]<=value:
        array.append(value)
        return array
    indi=binary_search(array, value)
    if array[indi]<value:
        indi+=1
    array=array[:indi]+[value]+array[indi:]
   
    return array
def check_palindrome(s):
    n=len(s)
    for i in range(len(s)//2):
        if s[i]!=s[ni]:
            return False
            break
    else:
        return True
def factors(s):
    listt=[]
    for i in rang+e(1,int(s**0.5)+1):
        if s%i==0:
            listt.append(i)
            listt.append(s//i)
    listt.sort()
    return listt
def ask(a):
    return stdout.flush(a)
def check_prime(a):
    if a<2:
        return False
    for i in range(2,int(a**0.5)+1):
        if a%i==0:
            return False
    else:
        return True
import math
import time
########om namah shivay#######
t=int(input())
a=t
b=t-1
c=t-2
if t<=2:
    print(t)
else:
    num=(a*b)//gcd(a, b)
    num2=(num*c)//gcd(num,c)
    print(num2)
