'''****** Задание ******** *Зайка - 4. ''' places = int(input()) N = 0 for i in range(places): nature = input() if 'зайка' in nature: N += 1 print(N)