# for
count = 0
for i in range(7):
if str(int(input("Число: ")))[-1] == "5":
count += 1
print(count)
# while
num = 0
while num < 7:
num += 1
# for
count = 0
for i in range(7):
if str(int(input("Число: ")))[-1] == "5":
count += 1
print(count)
# while
num = 0
count = 0
while num < 7:
if str(int(input("Число: ")))[-1] == "5":
count += 1
num += 1
print(count)