COCI '08 Contest 5 #1 Ljesnjak

View as PDF

Submit solution

Points: 5
Time limit: 1.0s
Memory limit: 32M

Problem type

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:

Letter Characters
č c=
ć c-
đ 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 Specification

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 Specification

Output the number of letters in the input word.

Sample Input 1


Sample Output 1


Sample Input 2


Sample Output 2



There are no comments at the moment.