# coding: utf-8 #yuki_152 import math def gcd(a, b): while b: a, b = b, a % b return a L=int(raw_input()) L=L/4 sq=int(math.sqrt(L)) count=0 for n in xrange(1,sq+1): for m in xrange(n+1,sq+1): if (m-n)%2==0 or gcd(m,n)!=1: continue if L>0: l=2*m*(m+n) if l>L: break count+=1 print count