#include using namespace std; int a,b,c,d; int minimumNumber(int n, string password) { for(int i=0;i=97 && temp<=122) a++; if(temp>=65 && temp<=90) b++; if(temp>=48 && temp<=57) c++; if(temp==33 ||temp==34||temp==35||temp==36||temp==37||temp==64||temp==94||temp==42||temp==38||temp==40||temp==41||temp==43||temp==45) d++; } if(n>=6 && a>0&&b>0&&c>0&&d>0) return 0; int e=0; if(a==0) e++; if(b==0) e++; if(c==0) e++; if(d==0) e++; if(n<6) { if(e+n<=6) return 6-n; return e; } return e; } int main() { int n; cin >> n; string password; cin >> password; int answer = minimumNumber(n, password); cout << answer << endl; return 0; }