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) { // Return the minimum number of characters to make the password strong int res=0; if(n<6) res=6-n; int prUpper=0,prLower=0,prDigit=0,prCharacter=0; String spclCharacter="!@#$%^&*()-+"; for(int i=0;i=0) prCharacter++; } if(res<4) { int temp=0; if(prUpper>0) temp++; if(prLower>0) temp++; if(prDigit>0) temp++; if(prCharacter>0) temp++; res=(4-temp)>res?(4-temp):res; } return res; } 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(); } }