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.
# This code is contributed by Siddharth


from sys import *
input = stdin.readline



import threading
from bisect import *
import math
from collections import *
import operator
from heapq import *
from itertools import *
inf=10**19
mod=10**9+7
MOD=998244353
S1 = 'abcdefghijklmnopqrstuvwxyz'
S2 = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'
drow = [0, 1, 0, -1]
dcol = [-1, 0, 1, 0]
# inverse modulo power pow(a,-1,mod) - it only works on py 3.8 ( *not in pypy )
setrecursionlimit(200005)
def asc(c):
    return ord(c)-97+1




# ==========================================> Code Starts Here <=====================================================================)

def gcd(a, b):
    if b == 0:
        return a
    else:
        return gcd(b, a % b)


def lcm(a, b):
    return (a * b) // gcd(a, b)



n=int(input())
if n<=2:
    print(n)
elif n==3:
    print(6)
elif n%2:
    print(n*(n-1)*(n-2))
else:
    tt=min(50,n)
    maxx=0
    for i in range(max(1,n-tt),n+1):
        for j in range(max(1,n-tt),n+1):
            for k in range(max(1,n-tt),n+1):
                maxx=max(maxx,lcm(lcm(i,j),k))
    print(maxx)