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

#SP0000178. Số lẻ có đúng tám ước (105)

HỌC THEO LỘ TRÌNH

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

1 lộ trình

Số lẻ có đúng tám ước (105)

105

Source: AtCoder ABC106 B — https://atcoder.jp/contests/abc106/tasks/abc106_b
Edition: Phuoc Hung OJ Extended; one dataset per program run. Subtasks are authored for PHOJ, not claimed to be official.

Problem

Count the odd positive integers in [1,N][1,N] with exactly eight distinct positive divisors. For instance, 105=3⋅5⋅7105=3\cdot5\cdot7 has eight divisors.

Input

One integer NN.

Output

Print the number of qualifying odd integers.

Subtasks

  • Subtask 1 (20 points): 1≤N≤1051\le N\le105.
  • Subtask 2 (30 points): 1≤N≤1641\le N\le164.
  • Subtask 3 (50 points): 1≤N≤2001\le N\le200.

Example

Input

105

Output

1

Explanation

105105 is the first odd integer with exactly eight divisors, hence the answer at N=105N=105 is 11.