print1634. Croatian alphabet

printCroatian alphabet

Ограничения: время – 1s/2s, память – 32MiB Ввод: input.txt или стандартный ввод Вывод: output.txt или стандартный вывод copy
Послать решение Blockly Посылки Темы Где Обсудить (0)

Not so long ago, before operating systems were as powerful as they are today, computers (which often had turbo buttons on the exterior) couldn't handle certain letters of the Croatian alphabet. Programmers agreed to use two or three letter substitutions as in this table:
LetterCharacters
`č` c=
`ć` c-
d`ž` dz=
`ď` d-
lj lj
nj nj
`š` s=
`ž` z=
For example, the word ljes=njak consists of six letters in the Croatian alphabet: lj, e, `š`, nj, a, k.
Write a program that calculates the number of letters in the given word.
Input
The first line contains a string of at most 100 characters. Only lowercase letters of the English alphabet and characters '–' and '=' will appear.
The string will represent a word encoded as described above.
Output
Output the number of letters in the input word.

Sample Input 1

dz=ak

Sample Output 1

3

Sample Input 2

ljes=njak

Sample Output 2

6
Source: COCI 2008/2009, contest #5
loading