n=int(input())
temp=[]
cnt=0
past=0
for i in range(n):
word=str(input())
for i in word:
# print(i)
if i not in temp or past==i:
temp.append(i)
past=i
else:
cnt+=1
break
past=0
temp=[]
print(n-cnt)
'Python > 코딩 테스트' 카테고리의 다른 글
백준 27376 python (0) | 2024.08.13 |
---|---|
백준 2941 python (0) | 2024.08.13 |
백준 10828 python (0) | 2024.08.13 |
백준 1193 python (0) | 2024.08.13 |
백준 7568 python (0) | 2024.08.13 |