Count integers from 1 to m whose divisor sum is even, where m reaches 10^12.
The sigma function σ(n)\sigma(n)σ(n) is the sum of all divisors of an integer nnn.
For example, σ(2)=1+2=3\sigma(2) = 1 + 2 = 3σ(2)=1+2=3, σ(6)=1+2+3+6=12\sigma(6) = 1 + 2 + 3 + 6 = 12σ(6)=1+2+3+6=12, and σ(12)=1+2+3+4+6+12=28\sigma(12) = 1 + 2 + 3 + 4 + 6 + 12 = 28σ(12)=1+2+3+4+6+12=28.
Given mmm, write a program that counts how many nnn with 1≤n≤m1 \le n \le m1≤n≤m have an even σ(n)\sigma(n)σ(n).
The first line contains mmm (1≤m≤10121 \le m \le 10^{12}1≤m≤1012).
Print the number of nnn with 1≤n≤m1 \le n \le m1≤n≤m whose σ(n)\sigma(n)σ(n) is even.