import java.util.Scanner; import static java.lang.Math.max; public class Main { static String numbers = "0123456789"; static String lower_case = "abcdefghijklmnopqrstuvwxyz"; static String upper_case = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"; static String special_characters = "!@#$%^&*()-+"; public static void main(String[] args) { Scanner scanner = new Scanner(System.in); scanner.nextInt(); String password = scanner.next(); int result = 0; if(!containsAny(password, numbers)) result ++; if(!containsAny(password, lower_case)) result ++; if(!containsAny(password, upper_case)) result ++; if(!containsAny(password, special_characters)) result ++; System.out.println(max(result, 6 - password.length())); } private static boolean containsAny(String password, String set) { for(int i=0;i