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 lower=0,upper=0,digit=0,spl=0,total=0; // Return the minimum number of characters to make the password strong for(int i=0;i='a' && c<='z') lower++; else if(c>='A'&& c<='Z') upper++; else if(c>='0'&& c<='9') digit++; else spl++; } if(lower>0) total++; if(upper>0) total++; if(digit>0) total++; if(spl>0) total++; if((n+(4-total))>=6) { return (4-total); } else { return (4-total+(6-n-(4-total))); } } 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(); } }