#include #include #include #include #include #define N_MAX 10000 using namespace std; int kai(int n) { if (n > 0) return n *kai(n - 1); else return 1; } int main() { int N, ans = 0; char S[N_MAX]; cin >> N >> S; //ごり押してみる for (int i = 0; i < N; ++i) { if (S[i] > 'y') { ++ans; S[i] = 0; } } for (int i = 0; i < N; ++i) { if (S[i] == 'y') for (int j = 0; j < N; ++j) { if (S[j] > 'u') { ++ans; S[j] = S[i] = 0; } } } for (int i = 0; i < N; ++i) { if (S[i] == 'y') for (int j = 0; j < N; ++j) { if (S[j] == 'u') for (int k = 0; k < N; ++k) { if (k == i || k == j) continue; else if (S[k] > 'k') { ++ans; S[k] = S[j] = S[i] = 0; } } } } for (int i = 0; i < N; ++i) { if (S[i] == 'y') for (int j = 0; j < N; ++j) { if (S[j] == 'u') for (int k = 0; k < N; ++k) { if (S[k] == 'k') for (int l = 0; l < N; ++l) { if (l == i || l == j || l == k) continue; else if (S[l] > 'i') { ++ans; S[l] = S[k] = S[j] = S[i] = 0; } } } } } cout << ans; return 0; }