시간 제한 메모리 제한 제출 정답 맞은 사람 정답 비율
1 초 128 MB 13082 5647 4988 44.876%

문제

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

크로아티아 알파벳 변경
č 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
W3sicHJvYmxlbV9pZCI6IjI5NDEiLCJwcm9ibGVtX2xhbmciOiIwIiwidGl0bGUiOiJcdWQwNmNcdWI4NWNcdWM1NDRcdWQyZjBcdWM1NDQgXHVjNTRjXHVkMzBjXHViY2IzIiwiZGVzY3JpcHRpb24iOiI8cD5cdWM2MDhcdWM4MDRcdWM1ZDBcdWIyOTQgXHVjNmI0XHVjNjAxXHVjY2I0XHVjODFjXHVjNWQwXHVjMTFjIFx1ZDA2Y1x1Yjg1Y1x1YzU0NFx1ZDJmMFx1YzU0NCBcdWM1NGNcdWQzMGNcdWJjYjNcdWM3NDQgXHVjNzg1XHViODI1XHVkNTYwIFx1YzIxOFx1YWMwMCBcdWM1YzZcdWM1YzhcdWIyZTQuIFx1YjUzMFx1Yjc3Y1x1YzExYywgXHViMmU0XHVjN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