푸는데 2시간걸렸다 ㅋㅋ

그래도 도움 안받고 혼자 한거라 보람은 있네




a = input()
C = 0
Skip = []
for i in range(0, len(a)):
    if i in Skip:
        continue
    else:
        if i + 1 < len(a) and a[i] == "c":
            if a[i + 1] == "=" or a[i + 1] == "-":
                Skip.append(i + 1)
            C += 1
        elif a[i] == "d":
            if i + 2 < len(a) and a[i + 2] == "=" and a[i + 1] == "z":
                Skip.append(i + 1)
                Skip.append(i + 2)
            elif i + 1 < len(a) and a[i + 1] == "-":
                Skip.append(i + 1)
            C += 1
        elif a[i] == "l" and i + 1 < len(a):
            if a[i + 1] == "j":
                Skip.append(i + 1)
            C += 1
        elif a[i] == "n" and i + 1 < len(a):
            if a[i + 1] == "j":
                Skip.append(i + 1)
            C += 1
        elif a[i] == "s" and i + 1 < len(a):
            if a[i + 1] == "=":
                Skip.append(i + 1)
            C += 1
        elif a[i] == "z" and i + 1 < len(a):
            if a[i + 1] == "=":
                Skip.append(i + 1)
            C += 1
        else:
            C += 1
print(C)