#include using namespace std; int minimumNumber(int n, string password) { string h=password; int lo=0,hi=0,spe=0,num=0; int flag=0; // Return the minimum number of characters to make the password strong for(int i=0;i='a')&&(h[i]<='z')&&(lo==0)) lo=1; else if((h[i]>='A')&&(h[i]<='Z')&&(hi==0)) hi=1; else if((spe==0)&&((h[i]>=' ')&&(h[i]<='/'))||((h[i]>=':')&&(h[i]<='@'))||((h[i]>='[')&&(h[i]<='`'))||((h[i]>='{')&&(h[i]<='~'))) spe=1; else if((num==0)&&(h[i]>='0')&&(h[i]<='9')) num=1; } int fl=0; if(num==0) fl++; if(hi==0) fl++; if(spe==0) fl++; if(lo==0) fl++; if((h.length()+fl)<6) { int l=6-(h.length()+fl); fl+=l; } return fl; } int main() { int n; cin >> n; string password; cin >> password; int answer = minimumNumber(n, password); cout << answer << endl; return 0; }