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 char special[] = {'!','@','#','$','%','^','&','*','(',')','-','+'}; int k=4; int w=0,x=0,y=0,z=0; for(int i=0;i=48&&d<=57&&w==0) { k--; w=1; } if(d>=65&&d<=90&&x==0) { k--; x=1; } if(d>=97&&d<=122&&y==0) { k--; y=1; } if(z==0) { for(int j=0;j<12;j++) if(c==special[j]) { k--; z=1; } } } if(k+n<6) return 6-n; return k; } 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(); } }