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