import java.util.Scanner; public class Main_yukicoder152 { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int l = sc.nextInt(); int ret = 0; for (int n = 1; n * n < l; n++) { for (int m = n + 1; m * m < l; m += 2) { if (gcd(n, m) != 1) { continue; } int tmp = m * (m + n) * 2; if (tmp * 4 <= l) { ret ++; } } } System.out.println(ret); sc.close(); } private static int gcd(int n, int m) { if (m == 0) { return n; } else { return gcd(m, n % m); } } }