#include using namespace std; #ifdef LOCAL #include "settings/debug.cpp" #define _GLIBCXX_DEBUG #else #define Debug(...) void(0) #endif #define rep(i, n) for (int i = 0; i < (n); ++i) using ll = long long; using ull = unsigned long long; int main() { int n; string s; cin >> n >> s; string t = ""; for (char c : s) { t += c; if (t.size() >= 7 && t.substr(t.size() - 7) == "CPCTCPC") { rep(_, 7) t.pop_back(); t += "CPCTF"; } } int ans = 0; rep(i, t.size()) { if (t.substr(i, 5) == "CPCTF") ans++; } cout << ans << endl; return 0; }