eolymp
bolt
Try our new interface for solving problems
Problems

Multiples

Multiples

Find the number from $1$ to $n$ inclusively such that its factorization into prime factors the number of factors is maximized. If there are several such numbers, choose the maximum of them. For example, if $n = 7$, the answer is $6$, as the biggest number that has in its factorization two primes $2$ and $3$. \InputFile One integer $n\:(1 \le n \le 2^{31} - 1)$. \OutputFile Print the required number.
Time limit 1 second
Memory limit 128 MiB
Input example #1
7
Output example #1
6
Source 2018 Azerbaijan School Competition, II Stage, April 8, Problem O