n=int(input())
ans=0
for i in range(n):
s=input()
k=0
chk=[0]*26
while len(s)-k:
if chk[ord(s[k])-97]==1:
chk[ord(s[k])-97]=2
break
if chk[ord(s[k])-97]==0:
chk[ord(s[k])-97]=1
while True:
if k<len(s)-1 and s[k]==s[k+1]:
k+=1
elif k<len(s)-1 and s[k]!=s[k+1]:
break
elif k==len(s)-1:
break
k+=1
ans+=2-max(chk)
print(ans)
'백준(BOJ) 풀이' 카테고리의 다른 글
[백준 2775] 부녀회장이 될테야 (0) | 2019.11.14 |
---|---|
[백준 10250] 10250 ACM 호텔 (0) | 2019.11.14 |
[백준 2941] 크로아티아 알파벳 (0) | 2019.11.14 |
[백준 5622] 다이얼 (0) | 2019.11.14 |
[백준 2908] 상수 (0) | 2019.11.14 |