s = input()
ans = 0
count = 0
croatia = ['c=', 'c-', 'dz=', 'd-', 'lj', 'nj', 's=', 'z=']
for i in range(len(s)):
    if i + 1 != len(s):
        if s[i] + s[i + 1] in croatia:
            count += 1
    if i + 2 < len(s):
        if s[i] + s[i + 1] + s[i + 2] == croatia:
            count += 1
print(len(s) - count)

d14e4b60fe7e132175abcb34b300afc3a9072c1d
<mask token>

<mask token>
for i in range(len(s)):
    if i + 1 != len(s):
        if s[i] + s[i + 1] in croatia:
            count += 1
    if i + 2 < len(s):
        if s[i] + s[i + 1] + s[i + 2] == croatia:
            count += 1
print(len(s) - count)

s = input()
ans = 0
count = 0
croatia = ['c=', 'c-', 'dz=', 'd-', 'lj', 'nj', 's=', 'z=']
for i in range(len(s)):
    if i + 1 != len(s):
        if s[i] + s[i + 1] in croatia:
            count += 1
    if i + 2 < len(s):
        if s[i] + s[i + 1] + s[i + 2] == croatia:
            count += 1
print(len(s) - count)
