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

#GL0000043. Giá trị UCLN tối đa (Maximum GCD)

HỌC THEO LỘ TRÌNH

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

1 lộ trình

Giá trị UCLN tối đa (Maximum GCD)

Maximum GCD

Source: Codeforces

Version: Phuoc Hung OJ Extended

Problem Statement

Choose distinct integers a,ba,b with 1≤a<b≤n1\le a<b\le n. Determine the maximum possible gcd⁡(a,b)\gcd(a,b); do not output a pair.

Input

One line contains nn.

Output

Print the maximum GCD.

Subtasks

  • Subtask 1 (20 points): 2≤n≤1002 \le n \le 100
  • Subtask 2 (30 points): 2≤n≤1042 \le n \le 10^{4}
  • Subtask 3 (50 points): 2≤n≤1062 \le n \le 10^{6}

Examples

Input

5

Output

2

Explanation

Choosing 22 and 44 gives GCD 22; no pair with GCD at least 33 fits within 11 through 55.