#P0124. Antiprime

Antiprime

Description

If a positive integer nn greater than or equal to 11 satisfies that the divisor of all positive integers less than nn and greater than or equal to 11 is less than the divisor of nn, then nn is an Antiprime.
For example: 1, 2, 4, 6, 12, 24, they are all antiprimes.

Please calculate the maximum antiprime number that is not greater than nn.

Format

Input

A line of positive integers nn.

Output

Contains only one integer, i.e. the largest antiprime number that is not greater than nn.

Samples

1000
830

Limitation

1n2×1091 \le n \le 2 \times 10^9