#include using namespace std; string numbers = "0123456789"; string lower_case = "abcdefghijklmnopqrstuvwxyz"; string upper_case = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"; string special_characters = "!@#$%^&*()-+"; int minimumNumber(int n, string password) { bool num = true, low = true, upp = true, spec = true; for (char c : password) { if (numbers.find(c) != string::npos) num = false; if (lower_case.find(c) != string::npos) low = false; if (upper_case.find(c) != string::npos) upp = false; if (special_characters.find(c) != string::npos) spec = false; } int ss = num + low + upp + spec; return max(max(0, 6-n),ss); } int main() { int n; cin >> n; string password; cin >> password; int answer = minimumNumber(n, password); cout << answer << endl; return 0; }