#include #include #include #include #include using namespace std; int main() { int n; string s; cin >> n >> s; bool digit = false, lower = false, upper = false, special = false; for (int i = 0; i < n; ++i) { if (isdigit(s[i])) { digit = true; } if (islower(s[i])) { lower = true; } if (isupper(s[i])) { upper = true; } const string sch = "!@#$%^&*()-+"; if (sch.find(s[i]) != string::npos) { special = true; } } int rem = max(0, 6 - (int)s.size()); rem -= !digit + !upper + !lower + !special; cout << !digit + !upper + !lower + !special + max(0, rem) << endl; return 0; }