N=input()
a=0
b=0
c=0
d=0
for i in range(0,N):
    N=input().strip()
    if N=='AC':
        AC += 1
    elif N=='WA':
        WA += 1
    elif N=='TLE':
        TLE += 1
    elif N=='RE':
        RE += 1
print(int(AC))