Maximize the Ratio#10174

Maximize the Ratio

1 second
128 megabytes
Very easy

Consider the function defined for positive integers as R(x) = \frac{x}{S(x)}, where is the sum of all divisors of . For example, R(6) = \frac{6}{1 + 2 + 3 + 6} = 0.5, R(7) = \frac{7}{1 + 7} = 0.875.

Given , find an integer x \leq n such that is maximal. If there is more than one such integer, choose the largest one.

Input

The input contains one integer (1 \leq n \leq 10^5).

Output

Print one integer : the answer to the problem.

Examples

Example 1

Loading
Loading