#include using namespace std; int minimumNumber(int n, string password) { int i=0,tc; int lc=0,uc=0,sc=0,num=0; for(i=0;i=48)&&(tc<=57)) num++; if((tc>=65)&&(tc<=90)) uc++; if((tc>=97)&&(tc<=122)) lc++; if((tc==33)||(tc==64)||(tc==35)||(tc==36)||(tc==37)||(tc==94)||(tc==38)||(tc==40)||(tc==41)||(tc==42)||(tc==43)||(tc==45)) sc++; } int k=0; if(lc==0) k++; if(uc==0) k++; if(sc==0) k++; if(num==0) k++; if((n+k)>=6) return k; else return (6-n); } int main() { int n; cin >> n; string password; cin >> password; int answer = minimumNumber(n, password); cout << answer << endl; return 0; }