import functools


def erast(P):
    result = []
    arr = (P + 1)*[0]
    arr[0] = arr[1] = 1
    for i in range(P + 1):
        if arr[i] == 0:
            result.append(i)
            for j in range(i * i, P + 1, i):
                arr[j] = 1
    return result
    

primes = erast(211)
end = int(input())


@functools.cache
def path(v):
    paths = 0
    #print(v, primes[v], end)
    if primes[v] >= end:
        return 1

    for i in range(v + 1, len(primes)):
        if primes[i] > primes[v] + 14 or primes[i] > end:
            break
        paths += path(i)
    return paths

print(path(0))
    


