#include using namespace std; int minimumNumber(int n, string p) { int i,j; int c1=0,c2=0,c3=0,c4=0; for(i=0;i=97 && p[i]<=122){ c1++;} if(p[i]>=65 && p[i]<=90){ c2++;} if(p[i]>=48 && p[i]<=57){c3++;} if(p[i]==33 || p[i]==40 || p[i]==41 || p[i]==33 || p[i]==64 || p[i]==36 || p[i]==33 || p[i]==35 || p[i]==37 || p[i]==38 || p[i]==43 || p[i]==45 ){ c4++; } } int count=0; if(c1==0){count++; } if(c2==0){count++; } if(c3==0){count++; } if(c4==0){count++; } int x=6-n; return max(x,count); } int main() { int n; cin >> n; string password; cin >> password; int answer = minimumNumber(n, password); cout << answer << endl; return 0; }