import java.io.*; import java.util.*; import java.text.*; import java.math.*; import java.util.regex.*; public class Solution { static int minimumNumber(int n, String password) { int cnt=0; int len=password.length(); int dig=0; int lower=0; int upper=0; int special=0; String st="!@#$%^&*()-+"; Set myset=new HashSet<>(); for(int i=0;i=48 && c<=57) dig++; if(c>=65 && c<=90) upper++; if(c>=97 && c<=122) lower++; } if(special==0) cnt++; if(dig==0) cnt++; if(upper==0) cnt++; if(lower==0) cnt++; if(len+cnt<6) cnt+=6-len-cnt; return cnt; // Return the minimum number of characters to make the password strong } public static void main(String[] args) { Scanner in = new Scanner(System.in); int n = in.nextInt(); String password = in.next(); int answer = minimumNumber(n, password); System.out.println(answer); in.close(); } }