#include using namespace std; int minimumNumber(int n, string password) { int d,l,u,s; d=0; l=0; u=0; s=0; for(int i=0;i='0'&&password[i]<='9') { d++; } else if(password[i]>='a'&&password[i]<='z') { l++; } else if(password[i]>='A'&&password[i]<='Z') { u++; } else { s++; } } int cr=0; if(d==0) { cr++; } if(l==0) { cr++; } if(u==0) { cr++; } if(s==0) { cr++; } if(password.size()+cr<6) { cr+=(6-password.size()-cr); } return cr; } int main() { int n; cin >> n; string password; cin >> password; int answer = minimumNumber(n, password); cout << answer << endl; return 0; }