시간 제한 메모리 제한 제출 정답 맞은 사람 정답 비율
1 초 128 MB 14863 6598 5856 46.027%

문제

예전에는 운영체제에서 크로아티아 알파벳을 입력할 수가 없었다. 따라서, 다음과 같이 크로아티아 알파벳을 변경해서 입력했다.

크로아티아 알파벳 변경
č c=
ć c-
dz=
ñ d-
lj lj
nj nj
š s=
ž z=

예를 들어, ljes=njak은 크로아티아 알파벳 6개(lj, e, š, nj, a, k)로 이루어져 있다. 단어가 주어졌을 때, 몇 개의 크로아티아 알파벳으로 이루어져 있는지 출력한다.

dž는 무조건 하나의 알파벳으로 쓰이고, d와 ž가 분리된 것으로 보지 않는다. lj와 nj도 마찬가지이다. 위 목록에 없는 알파벳은 한 글자씩 센다.

입력

첫째 줄에 최대 100글자의 단어가 주어진다. 알파벳 소문자와 '-', '='로만 이루어져 있다.

단어는 크로아티아 알파벳으로 이루어져 있다. 문제 설명의 표에 나와있는 알파벳은 변경된 형태로 입력된다.

출력

입력으로 주어진 단어가 몇 개의 크로아티아 알파벳으로 이루어져 있는지 출력한다.

예제 입력 1

ljes=njak

예제 출력 1

6

예제 입력 2

ddz=z=

예제 출력 2

3

예제 입력 3

nljj

예제 출력 3

3

예제 입력 4

c=c=

예제 출력 4

2
W3sicHJvYmxlbV9pZCI6IjI5NDEiLCJwcm9ibGVtX2xhbmciOiIwIiwidGl0bGUiOiJcdWQwNmNcdWI4NWNcdWM1NDRcdWQyZjBcdWM1NDQgXHVjNTRjXHVkMzBjXHViY2IzIiwiZGVzY3JpcHRpb24iOiI8cD5cdWM2MDhcdWM4MDRcdWM1ZDBcdWIyOTQgXHVjNmI0XHVjNjAxXHVjY2I0XHVjODFjXHVjNWQwXHVjMTFjIFx1ZDA2Y1x1Yjg1Y1x1YzU0NFx1ZDJmMFx1YzU0NCBcdWM1NGNcdWQzMGNcdWJjYjNcdWM3NDQgXHVjNzg1XHViODI1XHVkNTYwIFx1YzIxOFx1YWMwMCBcdWM1YzZcdWM1YzhcdWIyZTQuIFx1YjUzM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