from random import randint
N = int(input())
k = 0
a = [randint(50,170) for i in range(N)]
for i in range(N):
if a[i] % 7 == 0:
k += 1
print(k)
from random import randint
N = int(input())
k = 0
a = [randint(50,170) for i in range(N)]
for i in range(N):
if a[i] % 7 == 0:
k += 1
print(k)