N = input() T = 000 while input() == "locked": T += 1 print(T) T += 1 print(T)