def Test():
    num=int(input())
    count=0
    for i in range(2,num):
        if(isPrime(i)):
            count=count+1
    print(count)
def isPrime(num):
    Prime=True
    for i in range(2,num):
        if(num%i==0):
            Prime=False
    return Prime
if __name__ == "__main__":
    Test()
c95bde7701e0b681db4467ad4987806e17182c8a
<mask token>

<mask token>


def isPrime(num):
    Prime = True
    for i in range(2, num):
        if num % i == 0:
            Prime = False
    return Prime


<mask token>

def Test():
    num = int(input())
    count = 0
    for i in range(2, num):
        if isPrime(i):
            count = count + 1
    print(count)


def isPrime(num):
    Prime = True
    for i in range(2, num):
        if num % i == 0:
            Prime = False
    return Prime


<mask token>

def Test():
    num = int(input())
    count = 0
    for i in range(2, num):
        if isPrime(i):
            count = count + 1
    print(count)


def isPrime(num):
    Prime = True
    for i in range(2, num):
        if num % i == 0:
            Prime = False
    return Prime


if __name__ == '__main__':
    Test()

def Test():
    num=int(input())
    count=0
    for i in range(2,num):
        if(isPrime(i)):
            count=count+1
    print(count)
def isPrime(num):
    Prime=True
    for i in range(2,num):
        if(num%i==0):
            Prime=False
    return Prime
if __name__ == "__main__":
    Test()