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 min = 0,min1=0; if(n<6) min = 6-n; int arr[] = new int[4]; for(int i=0;i=48&&ch<=57) arr[0]++; } // Return the minimum number of characters to make the password strong for(int i=0;i<4;i++){ if(arr[i]==0) min1++; } return min>min1?min:min1; } 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(); } }