#include using namespace std; int minimumNumber(int n, string password) { int length=password.size();int a=0,b=0,c=0,d=0;int temp=0; for(int i=0;i=97 && password.at(i)<=122)a=1; else if(password.at(i)>=48 && password.at(i)<=57)b=1; else if(password.at(i)>=65 && password.at(i)<=90)c=1; else {if(password.at(i)=='!' || password.at(i)=='@' || password.at(i)=='#' || password.at(i)=='$' || password.at(i)=='%' || password.at(i)=='^' || password.at(i)=='&' || password.at(i)=='*' || password.at(i)=='()' || password.at(i)=='-' || password.at(i)=='+')d=1; } if(a!=0 && b!=0 && c!=0 && d!=0){temp++;break;} } int ch=max((6-length),(4-a-b-c-d)); return ch; // Return the minimum number of characters to make the password strong } int main() { int n; cin >> n; string password; cin >> password; int answer = minimumNumber(n, password); cout << answer << endl; return 0; }