#include using namespace std; void main_() { int n; cin >> n; string s; cin >> s; int ans = 0; string suf = "HAPPY"; for(int i = 0; i < 5; i++){ if(s[n-5+i] != suf[i])ans++; } for(int i = 0; i + 5 < n;i += 5){ bool ex = true; for(int j = 0; j < 5; j++){ if(s[i+j] != suf[j])ex = false; } if(ex)ans++; } cout << ans << endl; }; int main() { int t = 1; // cin >> t; while(t--) main_(); return 0; }