시간 제한 메모리 제한 제출 정답 맞은 사람 정답 비율
3 초 512 MB 3 2 2 66.667%

문제

We call a positive integer an antiprime if it has more divisors than any positive integer less than that number. Example antiprime numbers are: 1, 2, 4, 6, 12, 24.

Write a program which:

  • reads from the standard input a positive integer n,
  • computes the largest antiprime number not greater than n,
  • writes the result to the standard output.

입력

The first and only line of standard input contains a single integer n, 1 ≤ n ≤ 2,000,000,000.

출력

In the only line of standard output your program should write one integer - the largest antiprime number not greater than n.

예제 입력

1000

예제 출력

840

힌트