import java.io.*; import java.util.*; import java.text.*; import java.math.*; import java.util.regex.*; public class Solution { static String numbers = "0123456789"; static String lower_case = "abcdefghijklmnopqrstuvwxyz"; static String upper_case = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"; static String special_characters = "!@#$%^&*()-+"; static int minimumNumber(int n, String password) { int num = 0; int low = 0; int upp = 0; int spec =0; for(int i=0; i=6){ result = 4-(num+low+upp+spec); }else{ if(4-(num+low+upp+spec)>=(6-n)){ result = 4-(num+low+upp+spec); }else{ result = 6-n; } } return result; } 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(); } }