n=int(input())

A=[0 for i in range(n)]

for i in range(n):
    A[i]=int(input())

for i in range(1,n+1):
  x=0
  for j in range(1,i+1):
    if i%j == 0:
      x+=1
  if x==2:
      x+=1
      
print(x)

