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