시간 제한메모리 제한제출정답맞힌 사람정답 비율
3 초 512 MB47291768.000%

문제

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.

예제 입력 1

1000

예제 출력 1

840