#define _USE_MATH_DEFINES #define _CRT_SECURE_NO_DEPRECATE #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include using namespace std; typedef long long ll; typedef unsigned long long ull; typedef pair Pii; typedef pair Pll; #define FOR(i,n) for(int i = 0; i < (n); i++) #define sz(c) ((int)(c).size()) #define ten(x) ((int)1e##x) #define tenll(x) ((ll)1e##x) template T gcd(T a, T b) { return b ? gcd(b, a % b) : a; } int main(){ const string base = "yuki"; int n; cin >> n; string s; cin >> s; vector x(9); FOR(i, n){ int pt = 0; while (pt < 4 && s[i] < base[pt]) pt++; if (pt != 4 && s[i] == base[pt]) x[pt * 2 + 1]++; else x[pt * 2]++; } int ans = x[0]; int a, b, c, d, e, f, g, h; tie(a, b, c, d, e, f, g, h) = tie(x[1], x[2], x[3], x[4], x[5], x[6], x[7], x[8]); while (a&&c&&e&&g&&h) ans++, a--, c--, e--, g--, h--; while (a&&c&&e&&g/2) ans++, a--, c--, e--, g -= 2; while (a&&c&&e&&f) ans++, a--, c--, e--, f--; while (a&&c&&e/2) ans++, a--, c--, e -= 2; while (a&&c&&d) ans++, a--, c--, d--; while (a&&c/2) ans++, a--, c -= 2; while (a&&b) ans++, a--, b--; while (a/2) ans++, a-=2; cout << ans << endl; }