#include using namespace std; int minimumNumber(int n, string password) { // Return the minimum number of characters to make the password strong int num=0, lower=0, upper=0, special=0; for(char c: password) { if(c>='0' && c<='9') num++; if(c>='a' && c<='z') lower++; if(c>='A' && c<='Z') upper++; if(c=='!' || c=='@' || c=='#' || c=='$' || c=='%' || c=='^' || c=='&' || c=='*' || c=='(' || c==')' || c=='-' || c=='+') special++; } if(n>6) { return !num + !lower + !upper + !special; } else { return max(6-n, !num + !lower + !upper + !special); } } int main() { int n; cin >> n; string password; cin >> password; int answer = minimumNumber(n, password); cout << answer << endl; return 0; }