#include using namespace std; int minimumNumber(int n, string password) { // Return the minimum number of characters to make the password strong string numbers = "0123456789",lower_case = "abcdefghijklmnopqrstuvwxyz",upper_case ="ABCDEFGHIJKLMNOPQRSTUVWXYZ", special_characters = "!@#$%^&*()-+"; int count=0, temp, nn=0, l=0, u=0, s=0; for(int i=0; i< n; i++){ if(numbers.find(password[i])!=string::npos){ nn++; } if(lower_case.find(password[i])!=string::npos){ l++; } if(upper_case.find(password[i])!=string::npos){ u++; } if(special_characters.find(password[i])!=string::npos){ s++; } } if(nn==0)count++; if(l==0)count++; if(u==0)count++; if(s==0)count++; if((n+count)<6) { count+=6-(n+count); } return count; } int main() { int n; cin >> n; string password; cin >> password; int answer = minimumNumber(n, password); cout << answer << endl; return 0; }