#include using namespace std; int minimumNumber(int n, string password) { int count = 0; bool uc = false; bool lc = false; bool sp = false; bool no = false; set sp_s = {'!','@','#','$','%','^','&','*','(',')','-','+','"'}; for (int i = 0; i < password.length(); i++){ if ((password[i] >= 'a') && (password[i] <= 'z')) lc = true; if ((password[i] >= 'A') && (password[i] <= 'Z')) uc = true; if ((password[i] >= '0') && (password[i] <= '9')) no = true; if (sp_s.find(password[i]) != sp_s.end()) sp = true; } if (!lc) count++; if (!uc) count++; if (!no) count++; if (!sp) count++; while ((n + count) < 6) count++; return count; // Return the minimum number of characters to make the password strong } int main() { int n; cin >> n; string password; cin >> password; int answer = minimumNumber(n, password); cout << answer << endl; return 0; }