#include #include #include #include using namespace std; int minimumNumber(int n, string password) { // Return the minimum number of characters to make the password strong bool cond[4] = {0,0,0,0}; for(int i=0;i96 && mark<123) cond[0] = 1; else if(mark>64 && mark<91) cond[1] = 1; else if(mark>47 && mark<58) cond[2] = 1; else if((mark>32 && mark<39) || (mark>39 && mark<44) || (mark == 45) || (mark == 94) || mark == 64) cond[3] = 1; } int temp = 0; for(int i = 0; i < 4;i++) if(cond[i] == 0) temp++; int temp2 = 0; if(n<6) temp2 = 6-n; if(temp2>temp) return temp2; else return temp; } int main() { int n; cin >> n; string password; cin >> password; int answer = minimumNumber(n, password); cout << answer << endl; return 0; }