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 random, math
from copy import deepcopy as dc

MAXN = 1000001
primes = [0]*MAXN
primes[0] = 0
primes[1] = 0
def seive():
	i = 2
	while i*i < MAXN:
		if primes[i]:
			for j in range(i*i, MAXN, i):
				primes[j] = 0
		i += 1
	last_prime = 3
	ll_prime = 2
	primes[1] = 1
	primes[2] = 2
	primes[3] = 6
	for i in range(4, MAXN):
		if primes[i]:
			first = dc(i)
			second = i - 1
			primes[i] = first * second * last_prime
			ll_prime = dc(last_prime)
			last_prime = dc(i)
		else:
			first = dc(i)
			primes[i] = first * last_prime * ll_prime


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

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

# Function to call the actual solution
def solution(n):
	if n == 1:
		return 1
	a = dc(n)
	b = dc(n-1)
	c = dc(n-2)
	l = lcm(a, b)
	l = lcm(l, c)
	return l



# Function to take input
def input_test():
	n = int(input())
	out = solution(n)
	print(out)

# Function to check test my code
def test():
	pass

# seive()
input_test()
# test()