PHƯỚC HƯNG OJ · THỬ THÁCH THUẬT TOÁN

#SP0000011. Phản ví dụ cho giả thuyết của PolandBall (PolandBall and Hypothesis)

HỌC THEO LỘ TRÌNH

Bài tập thuộc lộ trình

1 lộ trình

Phản ví dụ cho giả thuyết của PolandBall (PolandBall and Hypothesis)

PolandBall and Hypothesis

Source: Codeforces

Version: Phuoc Hung OJ Extended

Problem Statement

PolandBall believes there is a positive integer nn for which n⋅m+1n\cdot m+1 is prime for every positive integer mm. Disprove the claim for the given nn by finding any allowed integer mm such that n⋅m+1n\cdot m+1 is not prime. Any valid answer is accepted, and the answer need not be minimal.

Input

One line containing integer nn.

Output

Print any integer mm with 1≤m≤10001\le m\le1000 for which n⋅m+1n\cdot m+1 is not prime. A valid answer is guaranteed to exist.

Subtasks

  • Subtask 1 (20 points): 1≤n≤251\le n\le 25; 1≤m≤10001\le m\le 1000; a valid answer exists.
  • Subtask 2 (30 points): 1≤n≤2001\le n\le 200; 1≤m≤10001\le m\le 1000; a valid answer exists.
  • Subtask 3 (50 points): 1≤n≤10001\le n\le 1000; 1≤m≤10001\le m\le 1000; a valid answer exists.

Examples

Input

3

Output

1

Explanation

For n=3n=3, choosing m=1m=1 gives 3⋅1+1=4=2⋅23\cdot1+1=4=2\cdot2, which is composite. The answer is in the required range.

Input

4

Output

2

Explanation

For n=4n=4, m=1m=1 gives prime 55, but m=2m=2 gives 9=3⋅39=3\cdot3, which is composite. Thus 2 is a valid output.