from collections import Counter N=int(input()) S=input().strip() C=Counter(S) ANS=0 ALL="abcdefghijklmnopqrstuvwxyz" YUKI="yuki" for i in range(10**6): #print(C) if C["y"]>0 and C["u"]>0 and C["k"]>0 and C["i"]>0: C["y"]-=1 C["u"]-=1 C["k"]-=1 C["i"]-=1 for s in ALL: if C[s]>0: C[s]-=1 ANS+=1 break continue if C["y"]>0 and C["u"]>0 and C["k"]>0: C["y"]-=1 C["u"]-=1 C["k"]-=1 for s in ALL: if s>"i" and C[s]>0: C[s]-=1 ANS+=1 break continue if C["y"]>0 and C["u"]>0: C["y"]-=1 C["u"]-=1 for s in ALL: if s>"k" and C[s]>0: C[s]-=1 ANS+=1 break continue if C["y"]>0: C["y"]-=1 for s in ALL: if s>"u" and C[s]>0: C[s]-=1 ANS+=1 break continue if C["z"]>0: C["z"]-=1 ANS+=1 else: break print(ANS)