L=gets.to_i/4 r=0 (2..L).each{|m| (1-m%2).step(m-1,2){|n| next if m.gcd(n)>1 break if 2*m*m+2*m*n>L r+=1 } } p r