#include using namespace std; string arr[] = {"0123456789", "abcdefghijklmnopqrstuvwxyz", "ABCDEFGHIJKLMNOPQRSTUVWXYZ", "!@#$%^&*()-+"}; int minimumNumber(int n, string password) { // Return the minimum number of characters to make the password strong map < char, bool > M; for(int i = 0; i < password.size(); ++i) M[password[i]] = 1; int res = 0; for(int i = 0; i < 4; ++i) { bool ok = 0; for(int j = 0; j < arr[i].size(); j++) { ok |= M[arr[i][j]]; } res += !ok; } return res + max(0, (int)(6 - (res + password.size()))); } int main() { int n; cin >> n; string password; cin >> password; int answer = minimumNumber(n, password); cout << answer << endl; return 0; }