import java.util.*; public class StrongPassword { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int n = sc.nextInt(); String pass = sc.next(); /*if(n<6) { System.out.println(6-n); System.exit(0); }*/ char ch; int flag1=0, flag2=0, flag3=0, flag4=0; for(int i=0; i='A' && ch<='Z')) { flag1 = 1; } else if((ch>='a' && ch<='z')) { flag2 = 1; } else if((ch>='0' && ch<='9')) { flag3 = 1; } else if(ch=='!'||ch=='@'||ch=='#'||ch=='$'||ch=='%'||ch=='^'||ch=='&'||ch=='*'||ch=='('||ch==')'||ch=='-'||ch=='+') { flag4 = 1; } } int x = 4-(flag1+flag2+flag3+flag4); if((6-(n+x))>0) { System.out.println(6-n); } else System.out.println(x); } }