#include using namespace std; int minimumNumber(int n, string password) { // Return the minimum number of characters to make the password strong int i; int found1=0,found2=0,found3=0,found4=0; for(i=0;i='0' && password[i]<='9') found1++; else if(password[i]>='A' && password[i]<='Z') found2++; else if(password[i]>='a' && password[i]<='z') found3++; else found4++; } int r1=0,r2=0,r3=0,r4=0; if(found1==0){ r1=1; } if(found2==0){ r2=1; } if(found3==0){ r3=1; } if(found4==0){ r4=1; } if(r1+r2+r3+r4+n >=6) return r1+r2+r3+r4; else return 6-n; } int main() { int n; cin >> n; string password; cin >> password; int answer = minimumNumber(n, password); cout << answer << endl; return 0; }