fork(1) download
  1. s = input()
  2.  
  3. count_k = s.count('k')
  4.  
  5. if count_k == 0:
  6. print(0)
  7. elif count_k == 1:
  8. print(s.index('k') + 1)
  9. else:
  10. print(count_k)
Success #stdin #stdout 0.08s 14144KB
stdin
Lo hghkbhvfdgtttt
Yhjjllga
kknhjgvhghkkvthbbygk
stdout
7