#include #include #include #include #include using namespace std; string numbers = "0123456789"; string lower_case = "abcdefghijklmnopqrstuvwxyz"; string upper_case = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"; string special_characters = "!@#$%^&*()-+"; int main() { int n; string s; cin >> n >> s; bool a = false, b = false, e = false, d = false; for (char c : s) { for (char x : numbers) { if (x == c) a = true; } for (char x : lower_case) { if (x == c) b = true; } for (char x : upper_case) { if (x == c) e = true; } for (char x : special_characters) { if (x == c) d = true; } } int ans = n + !a + !b + !e + !d; if (ans < 6) ans = 6; cout << ans - n << '\n'; return 0; }