#!/usr/bin/python from fractions import gcd L = int(raw_input()) res = 0 M = int((L/8)**.5) for n in xrange(1, M+1): for m in xrange(n+1, M+1, 2): if gcd(m, n) == 1: if 8 * m * (m + n) > L: break res += 1 print res