#include using namespace std; int minimumNumber(int n, string p) { // Return the minimum number of characters to make the password strong int l=0,u=0,s=0,d=0; for(int i=0;i=48 && p[i]<=57) d++; else if(p[i]>=65 && p[i]<=90) u++; else if(p[i]>=97 && p[i]<=122) l++; else s++; } int dd=0; if(n>=6){ if(!l) dd++;if(!s) dd++;if(!u) dd++;if(!d) dd++; return dd; } else{ if(!l) dd++;if(!s) dd++;if(!u) dd++; if(!d) dd++; if( (n+dd)>=6 ) return dd; else return dd+abs(6-(n+dd)); } } int main() { int n; cin >> n; string password; cin >> password; int answer = minimumNumber(n, password); cout << answer << endl; return 0; }