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.
def  MCD(a,b):
        if a%b==0:
                return b
        else:
                return MCD(b,a%b)
        
x=int(input())
z=1
salida=0
salida2=0

a=x+1
b=a-1
c=b-1
if x>4:
        for k in range (3):
                a=a-1
                b=a

                for l in range (3):
                        b=b-1
                        c=b
                        if b<1:
                                break

                        for m in range (3):
                                c=c-1
                                if c<1:
                                        break
                                if  ((MCD(a,b)==1 and MCD(b,c)==1 and MCD(a,c)==1)  and (a!=1 and b!=1 and c!=1 ) ):
                                        respuesta=a*b*c
                                        salida=1
                                        salida2=1
                                        break
                        if salida==1:
                                break

                if salida2==1:
                        z=2
                        break
else:
        if x==4:
                respuesta=12
        elif x==3:
                respuesta=6
        else:
                respuesta=x
print(respuesta)