Вот
a = int(input())
lis = [i for i in input().split()]
count = 0
for i in lis:
if int(i) > 9 and i[1] == '5':
count+=1
print(count)
Вот
a = int(input())
lis = [i for i in input().split()]
count = 0
for i in lis:
if int(i) > 9 and i[1] == '5':
count+=1
print(count)