import sys
S = list(input())
Ans_list=['k','e','y','e','n','c','e']
Ans = 0
for i in range(len(S)):
    for j in range(i,len(S),+1):
        
        if (S[:i:]+S[j::]) == Ans_list:
           Ans = 1
           print(Ans)
           sys.exit()
print(Ans)