#!/usr/bin/python3 import sys import re counter = 0 x = sys.stdin; for line in x: if(re.search(r"[0-9] [0-9]* [a-z]( [0.9])*", str(line))): counter += 1 print(counter)