from heapq import heappop,heappush n=int(input()) s=input() y='yuki' h=[] ans=0 for i in s: heappush(h,-ord(i)) f=1 while len(h) > 0 and f == 1: f=0 for i in range(4): if len(h) == 0: break t = heappop(h) if -t > ord(y[i]): f=1 ans += 1 break print(ans)