#include #include #include #include #include using namespace std; int main() { /* Enter your code here. Read input from STDIN. Print output to STDOUT */ int n; cin >> n; string s; cin >> s; string num = "0123456789"; string lo = "abcdefghijklmnopqrstuvwxyz"; string up = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"; string sp = "!@#$%^&*()-+"; int cn = 0, ca = 0, cA = 0, cs = 0; for (char ch : s) { cn += num.find(ch) != string::npos; ca += lo.find(ch) != string::npos; cA += up.find(ch) != string::npos; cs += sp.find(ch) != string::npos; } cout << max(6 - n, 4 - (cn > 0) - (ca > 0) - (cA > 0) - (cs > 0)) << endl; return 0; }