#include #include #include #include #include #include #include int minimumNumber(int n, char* p) { // Return the minimum number of characters to make the password strong int t[4]={0,0,0,0},k; for(k=0;k='0' && p[k]<='9') t[0]++; else if(p[k]<='z' && p[k]>='a') t[1]++; else if(p[k]<='Z' && p[k]>='A') t[2]++; else t[3]++; } int c=0; for(k=0;k<4;k++) { if(t[k]==0) c++; } if(c==0) { if(n>=6) return 0; else return (6-n); } else { if(n>=6 || (n+c)>=6) return c; else return (c+(6-(n+c))); } } int main() { int n; scanf("%i", &n); char* password = (char *)malloc(512000 * sizeof(char)); scanf("%s", password); int answer = minimumNumber(n, password); printf("%d\n", answer); return 0; }