Problem hidden
|This problem was hidden by Editorial Board member probably because it has incorrect language|version or invalid test data, or description of the problem is not clear.|

VPRIMEAROUND - Nearest Prime Number

Given an integer n (2 ≤ n ≤ 1012). Find the highest possible integer p such that p ≤ n and p is a prime.

Input

The first and only line contains the integer n.

Output

One line contains the integer p.

Example

Input:
10

Output:
7

Được gửi lên bởi:Viet-Hoa Do
Ngày:2017-07-17
Thời gian chạy:1s
Giới hạn mã nguồn:50000B
Memory limit:1536MB
Cluster: Cube (Intel G860)
Ngôn ngữ cho phép:ASM32-GCC ASM32 ASM64 BASH C-CLANG C NCSHARP C++ 4.3.2 CPP CPP14 CPP14-CLANG C99 GO JULIA PYPY3

© Spoj.com. All Rights Reserved. Spoj uses Sphere Engine™ © by Sphere Research Labs.