#include using namespace std; int minimumNumber(int n, string pass) { bool l=false,u=false,d=false,s=false; char special; for(int i =0; i < pass.size(); i++){ if( islower(pass[i]) ) l = true; if( isupper(pass[i]) ) u = true; if( isdigit(pass[i]) ) d = true; special = pass.find_first_not_of("abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890 "); if (special != string::npos) s = true; } int cnt=0; if(l==false){ cnt++; n++; } if(u==false){ cnt++; n++; } if(d==false){ cnt++; n++; } if(s==false){ cnt++; n++; } if(n<6){ cnt+=(6-n); } return cnt; } int main() { int n; cin >> n; string password; cin >> password; int answer = minimumNumber(n, password); cout << answer << endl; return 0; }