#include using namespace std; int minimumNumber(int n, string password) { // Return the minimum number of characters to make the password strong int one=0, two=0, i; string str = password; bool dig = false, lc = false, uc = false, sp = false; one = max(0,6-n); for (i=0;i= '0' && str[i] <= '9') dig = true; if (str[i] >= 'a' && str[i] <= 'z') lc = true; if (str[i] >= 'A' && str[i] <= 'Z') uc = true; // !@#$%^&*()-+ if (str[i] == '!' || str[i] == '@' ||str[i] == '$' ||str[i] == '%' ||str[i] == '^' ||str[i] == '&' ||str[i] == '*' ||str[i] == '(' ||str[i] == ')' ||str[i] == '-' ||str[i] == '+' ||str[i] == '#') sp = true; } if (dig == false) two++; if (lc == false) two++; if (uc == false) two++; if (sp == false) two++; return max(one,two); } int main() { int n; cin >> n; string password; cin >> password; int answer = minimumNumber(n, password); cout << answer << endl; return 0; }