시간 제한 메모리 제한 제출 정답 맞은 사람 정답 비율
1 초 128 MB 9271 3704 3261 42.056%

문제

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

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