Counting Odd Binomial Coefficients

No attempts yetTime limit1sMemory limit256 MB

Problem

For non-negative integers mm and kk with kmk \le m, the binomial coefficient is defined as (mk)=m!k!(mk)!\binom{m}{k} = \frac{m!}{k!(m-k)!}. Let T2(n)T_2(n) be the number of pairs (m,k)(m, k) with 0km<n0 \le k \le m < n such that (mk)\binom{m}{k} is odd. The following inequality holds.

0.812556nlog23T2(n)nlog230.812556\,n^{\log_2 3} \le T_2(n) \le n^{\log_2 3}

Emma does not like an inequality that only brackets the answer, so she wants the exact value of T2(n)T_2(n). Help her compute it.

Input

The first line contains one integer nn (1n10111 \le n \le 10^{11}).

Output

Print the value of T2(n)T_2(n) on the first line.