Problem1276--练45.2 异或运算

1276: 练45.2 异或运算

[Creator : ]
Time Limit : 1.000 sec  Memory Limit : 64 MB

Description

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

Input

输入只有一行,该行包含一个整数$n$  ($0≤n≤10^6$ )。

Output

$x$ 的个数。

Sample Input Copy

2

Sample Output Copy

3