#include #define all(x) begin(x), end(x) using namespace std; using i32 = int; using i64 = long long; using ld = long double; template inline bool chmax(T1 &a, T2 b) {return a < b and (a = b, true);} template inline bool chmin(T1 &a, T2 b) {return a > b and (a = b, true);} const i64 supl = LONG_LONG_MAX / 2 - 100; const i32 supi = INT_MAX / 2 - 100; void main_() { i32 n; cin >> n; string s; cin >> s; vector info(3, map()); for (i32 i = 0 ; i < 3 * n ; i++) { info[i % 3][s[i]]++; } // for (auto [x, y] : info[0]) cout << x << ' ' << y << endl; i32 ans = 0; ans += min({ info[0]['c'], info[1]['o'], info[2]['n'] }); ans += min({ info[1]['c'], info[2]['o'], info[0]['n'] }); ans += min({ info[2]['c'], info[0]['o'], info[1]['n'] }); cout << ans << endl; } int main() { ios::sync_with_stdio(false); std::cin.tie(nullptr); main_(); return 0; }