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

#SP0000157. Số màu lớn nhất khi tô gạch (Tile Painting)

HỌC THEO LỘ TRÌNH

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

1 lộ trình

Số màu lớn nhất khi tô gạch (Tile Painting)

Tile Painting

Source: Codeforces 1243C
Version: Phuoc Hung OJ Extended — one dataset per judge run.

Problem Statement

There are nn tiles numbered from 11 to nn. Two distinct tiles i,ji,j must have the same color if ∣i−j∣>1|i-j|>1 divides nn. Find the maximum number of different colors.

Input

One line containing the integer nn.

Output

Print the maximum number of colors.

Subtasks

  • Subtask 1 (20 points): 1≤n≤100001\le n\le 10000.
  • Subtask 2 (30 points): 1≤n≤1000000001\le n\le 100000000.
  • Subtask 3 (50 points): 1≤n≤10000000000001\le n\le 1000000000000.

Example

Input

4

Output

2

Explanation

Tiles 1,31,3 have equal colors, and so do tiles 2,42,4, because the index difference 22 divides 44. Two colors are achievable.