a = [312,645,312,645,33,31,6,3]
count = 0
for i in a:
if i % 3 == 0 and i % 7 != 0:
count +=1
print(count)
a = [312,645,312,645,33,31,6,3]
count = 0
for i in a:
if i % 3 == 0 and i % 7 != 0:
count +=1
print(count)