import os x=0 for c in os.read(0,999): if'Y'==c:print x x+=1