#include using namespace std; int minimumNumber(int n, string psw) { // Return the minimum number of characters to make the password strong int a=1,b=1,c=1,d=1; int l; for(int i=0;i=(int)'0')&&(l<=(int)'9')) a=0; if((l>=(int)'A')&&(l<=(int)'Z')) b=0; if((l>=(int)'a')&&(l<=(int)'z')) c=0; if(l==(int)'!'||l==(int)'@'||l==(int)'#'||l==(int)'$'||l==(int)'%'||l==(int)'^'||l==(int)'&'||l==(int)'*'||l==(int)'('||l==(int)')'||l==(int)'-'||l==(int)'+') d=0; } if(psw.length()+a+b+c+d<6) return 6-psw.length(); else return a+b+c+d; } int main() { int n; cin >> n; string password; cin >> password; int answer = minimumNumber(n, password); cout << answer << endl; return 0; }