五一劳动节快乐!!!!


3987: 练45.2 异或运算

Memory Limit:64 MB Time Limit:1.000 S
Judge Style:Text Compare Creator:Imported
Submit:18 Solved:12

Description

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

Input

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

Output

x 的个数。

Sample Input Copy

2

Sample Output Copy

3