#!/usr/bin/env python3 import sys count = 0 for l in sys.stdin: seen = False for sig in l.strip().split(" "): if sig == "|": seen = True elif not seen: continue if len(sig) == 2 or len(sig) == 7 or len(sig) == 4 or len(sig) == 3: count += 1 print(count)