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