e-olymp
favorite We need a little bit of your help to keep things running, click on this banner to learn more
Competitions

Week 3: November 23 – 29. For Loop. Part 2

Greatest divisor

For a given positive integer n print its greatest divisor other than n.

Input

One positive integer n (1 < n < 2147000000).

Output

Print the greatest divisor of n other than n.

Time limit 1 second
Memory limit 128 MiB
Input example #1
21
Output example #1
7
Input example #10
2100000017
Output example #10
1
Author Matviychuk Sergiy Volodymyrovych
Source "ABC programming"