#d247. 数学

数学

Math

Problem Description

Given an integer nn, Professor Pang wants to divide the nn numbers 1∼n1\sim n into two groups, each group containing at least one number, such that the greatest common divisor of the sums of the two groups is as large as possible. Output the maximum possible greatest common divisor.

Note: the greatest common divisor is the largest among the common divisors of two or more integers.

Input Format

A single line containing one integer nn.

Output Format

Output one integer, the answer.

Sample Input

6

Sample Output

7

Constraints

For 20%20\% of the data, n≤100n\leq 100.

For 100%100\% of the data, n≤109n\leq 10^9.