import fractions l=input()/4 print sum(len([0 for n in range(1,min(m,l/m-m)+1,2)if fractions.gcd(m,n)<2]) for m in range(3,l,2))