#include #include #include using namespace atcoder; using mint = modint1000000007; using namespace std; #define rep(i,n) for (int i = 0; i < (n); ++i) #define Inf 1000000000 int main(){ string temp = "yuki"; temp += 'a' - 1; int N; cin>>N; string s; cin>>s; vector cnt(26,0); rep(i,s.size())cnt[s[i]-'a']++; vector c(1,cnt.back()); rep(i,temp.size()-1){ c.push_back(cnt[temp[i]-'a']); c.push_back(0); for(int j=temp[i]-'a'-1;j>temp[i+1]-'a';j--){ c.back() += cnt[j]; } } rep(i,c.size()){ //cout<> t = { {1,0,0,0,0,0,0,0,0}, {0,2,0,0,0,0,0,0,0}, {0,1,1,0,0,0,0,0,0}, {0,1,0,2,0,0,0,0,0}, {0,1,0,1,1,0,0,0,0}, {0,1,0,1,0,2,0,0,0}, {0,1,0,1,0,1,1,0,0}, {0,1,0,1,0,1,0,2,0}, {0,1,0,1,0,1,0,1,1} }; reverse(t.begin(),t.end()); int ans = 0; rep(i,t.size()){ while(true){ bool f = true; rep(j,t[i].size()){ if(t[i][j]<=c[j])continue; f = false; } if(!f)break; rep(j,t[i].size()){ c[j] -= t[i][j]; } ans++; } } cout<