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