#include using namespace std; int minimumNumber(int n, string password) { // Return the minimum number of characters to make the password strong int res = 0; int digit_found = 1; int lower_case_found = 1; int upper_case_found = 1; int special_character_found = 1; int length_addition = 0; for(int i = 0; i < n; i++){ if(password[i]>47 && password[i] < 58){ digit_found = 0; } if(password[i]>64 && password[i] < 91){ upper_case_found = 0; } if(password[i]>96 && password[i] < 123){ lower_case_found = 0; } if(password[i]==33||password[i]==64||password[i]==35||password[i]==36||password[i]==37||password[i]==94||password[i]==38|| password[i]==42||password[i]==40||password[i]==41||password[i]==45||password[i]==43){ special_character_found = 0; } } res = digit_found + upper_case_found + lower_case_found + special_character_found; if(n+res<6){length_addition = 6-n-res;} return res+length_addition; } int main() { int n; cin >> n; string password; cin >> password; int answer = minimumNumber(n, password); cout << answer << endl; return 0; }