#include using namespace std; #ifdef _RUTHEN #include #else #define show(...) true #endif using ll = long long; #define rep(i, n) for (int i = 0; i < (n); i++) template using V = vector; int main() { ios::sync_with_stdio(false); cin.tie(0); int N; cin >> N; string S; cin >> S; V> cnt(3, V(26)); rep(i, 3 * N) cnt[i % 3][S[i] - 'a']++; int ans = 0; rep(i, 3) { int r = min({cnt[(i + 0) % 3]['c' - 'a'], cnt[(i + 1) % 3]['o' - 'a'], cnt[(i + 2) % 3]['n' - 'a']}); ans += min(N - (i == 0 ? 0 : 1), r); } cout << ans << '\n'; return 0; }