l=gets.to_i/8 a=0 1.upto(l){|m|a+=(m+1..[m+m,l/m].min).count{|s|s.gcd(s-m-m)<2}} p a