#include using namespace std; int minimumNumber(int n, string password) { // Return the minimum number of characters to make the password strong std::string numbers = "0123456789"; std::string lower_case = "abcdefghijklmnopqrstuvwxyz"; std::string upper_case = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"; std::string special_characters = "!@#$%^&*()-+"; int count; count = password.length(); if (password.find_first_of(numbers) == std::string::npos) { count++; } if (password.find_first_of(lower_case) == std::string::npos) { count++; } if (password.find_first_of(upper_case) == std::string::npos) { count++; } if (password.find_first_of(special_characters) == std::string::npos) { count++; } if (count < 6) { return 6 - password.length(); } return count - password.length(); } int main() { int n; cin >> n; string password; cin >> password; int answer = minimumNumber(n, password); cout << answer << endl; return 0; }