N,M = map(int,input().split())
for k in range(M):
    N += 1 if input() == "fechou" else -1
print(N)

82975cd733b676323f7b9124e3c530eece87b953
<mask token>

<mask token>
for k in range(M):
    N += 1 if input() == 'fechou' else -1
print(N)

N, M = map(int, input().split())
for k in range(M):
    N += 1 if input() == 'fechou' else -1
print(N)

N,M = map(int,input().split())
for k in range(M):
    N += 1 if input() == "fechou" else -1
print(N)
