#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 add=0; if(n>=6){ if(!l) add++; if(!s) add++; if(!u) add++; if(!d) add++; return add; } else{ if(!l) add++; if(!s) add++; if(!u) add++; if(!d) add++; if( (n+add)>=6 ) return add; else return add+abs(6-(n+add)); } } int main() { int n; cin >> n; string password; cin >> password; int answer = minimumNumber(n, password); cout << answer << endl; return 0; }