#include using namespace std; int minimumNumber(int n, string password) { string numbers = "0123456789"; string lower_case = "abcdefghijklmnopqrstuvwxyz"; string upper_case = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"; string special_characters = "!@#$%^&*()-+"; vectorb(4); int count = 4; for(auto c: password){ if(!b[0] && isdigit(c)) count--, b[0] = 1; if(!b[1] && lower_case.find(c) != string::npos) count--, b[1] = 1; if(!b[2] && upper_case.find(c) != string::npos) count--, b[2] = 1; if(!b[3] && special_characters.find(c) != string::npos) count--, b[3] = 1; } if(n + count < 6) count += 6 - (n + count); return count; } int main() { int n; cin >> n; string password; cin >> password; int answer = minimumNumber(n, password); cout << answer << endl; return 0; }