import java.util.PriorityQueue;

public class Euler757 {
    static long isqrtU64(long n) {
        if (n == 0)
            return 0;
        long x = (long) Math.sqrt(n);
        while ((x + 1L) * (x + 1L) <= n)
            ++x;
        while (x * x > n)
            --x;
        return x;
    }

    static long maxYWithPronicLeq(long t) {
        long s = isqrtU64(1L + 4L * t);
        return (s - 1L) / 2L;
    }

    static class Node implements Comparable<Node> {
        long value;
        long px;
        int y;
        int yMax;

        Node(long value, long px, int y, int yMax) {
            this.value = value;
            this.px = px;
            this.y = y;
            this.yMax = yMax;
        }

        @Override
        public int compareTo(Node other) {
            return Long.compare(this.value, other.value);
        }
    }

    static long countStealthy(long limit) {
        long yGlobalMax = maxYWithPronicLeq(limit);
        long[] pronic = new long[(int) (yGlobalMax + 1)];
        for (int y = 1; y <= yGlobalMax; ++y) {
            pronic[y] = (long) y * (y + 1L);
        }

        int xMax = 0;
        for (int x = 1; x <= yGlobalMax; ++x) {
            long p = pronic[x];
            if (p > limit / p)
                break;
            xMax = x;
        }

        PriorityQueue<Node> pq = new PriorityQueue<>(xMax);

        for (int x = 1; x <= xMax; ++x) {
            long px = pronic[x];
            long maxT = limit / px;
            long yLim = maxYWithPronicLeq(maxT);
            if (yLim < x)
                continue;

            pq.add(new Node(px * px, px, x, (int) yLim));
        }

        long count = 0L;
        long last = -1L;

        while (!pq.isEmpty()) {
            Node cur = pq.poll();

            if (cur.value != last) {
                count++;
                last = cur.value;
            }

            if (cur.y < cur.yMax) {
                cur.y++;
                cur.value = cur.px * pronic[cur.y];
                pq.add(cur);
            }
        }

        return count;
    }

    public static String solve() {
        return Long.toString(countStealthy(100000000000000L));
    }

    public static void main(String[] args) {
        System.out.println(solve());
    }
}
