#T528. 求满足条件的整数个数

求满足条件的整数个数

Description

Find the count of all integers in the range 1 to n that satisfy the following conditions simultaneously:

  • Leaves a remainder of 2 when divided by 3,
  • Leaves a remainder of 3 when divided by 5,
  • Leaves a remainder of 2 when divided by 7.

If no such integer exists, output 0.

Input Format

The input consists of a single line containing one integer n (1 ≤ n ≤ 2000).

Output Format

Output a single line (which means there should be a newline at the end) containing one integer.

10
0

译文

CodesOnline