5123: 【45课】【3277】 异或运算

Memory Limit:128 MB Time Limit:1.000 S
Judge Style:Text Compare Creator:
Submit:20 Solved:17

Description

给定一个整数 n,求出0∼n之间满足 x xor (2 * x) xor (3 * x)=0的整数 x 有多少个。

Input

输入只有一行,该行包含一个整数n  (0≤n≤106 )。

Output

x 的个数。

Sample Input Copy

2

Sample Output Copy

3