单点时限: 1.0 sec
内存限制: 256 MB
lbrominewanted to play It Takes Two, but it takes two. So he went to his friends and asked them if they had played It Takes Two.
It is known that
lbrominehas $n$ friends. When he asks a friend, the friend will only answer that he has not played or played It Takes Two with another person.Because some of his friends are forgetful,maybe some friends have played It Takes Two but say no.
lbrominethinks that a friend has played It Takes Two only when the friend said he had played with another person or another friend of
lbrominesaid he had played with him.
lbrominewants to count how many friends he thinks have never played It Takes Two so that he can choose the right person to play with.
An integer $n$ in the first line indicates that
lbrominehas $n\ (1 \leq n\leq 10^5)$ friends.
The next $n$ line has two strings per line. The first string represents the friend’s name, and the second string represents the answer of the friend.
It is guaranteed that the answer of
lbromine'sfriends can only be
No or a person’s name (may not be a friend of
A person’s name only contains uppercase and lowercase letters and underscores,and the length cannot exceed $10$ characters.
no one names
One integer indicates how many friends
lbrominethinks have never played It Takes Two
3 CN_Amuzi No komorebi MaverickFW MaverickFW No