import sys input=lambda:sys.stdin.readline().rstrip() S=input() ind=0 for i in 'kadomatsu': if ind