#include using namespace std; int minimumNumber(int n, string str) { // Return the minimum number of characters to make the password strong char ar[] = {'!','@','#','$','%','^','&','(',')','-','+'}; int ans = 0; bool number = false,lower=false,upper=false,special = false; for(int i=0;i='a') { lower=true; } else if(str[i]<='Z' && str[i]>='A') { upper = true; } else if(str[i]<='9' && str[i]>='0') { number = true; } else { for(int j=0;j<11;j++) { if(str[i]==ar[j]) { special = true; } } } } if(!lower)ans++; if(!upper)ans++; if(!number)ans++; if(!special)ans++; ans = max(ans,6-n); return ans; } int main() { int n; cin >> n; string password; cin >> password; int answer = minimumNumber(n, password); cout << answer << endl; return 0; }