#include using namespace std; #define ll long long #define rep(i, n) for (int i = 0; i < (int)(n); i++) template bool chmin(T& a, T b){if(a > b){a = b; return true;} return false;} template bool chmax(T& a, T b){if(a < b){a = b; return true;} return false;} const long long mod=998244353; const long long mod2=469762049; const long long mod100=1000000007; int main(){ cout.tie()->sync_with_stdio(0); cin.tie(0); int N;cin>>N; string S;cin>>S; int ans=0; char C[5]={'H','A','P','P','Y'}; rep(i,5){ if(S[N-5+i]!=C[i]){ S[N-5+i]=C[i]; ans++; } } for(int i=0;i