import java.util.*; public class strong { public static void main(String []args) { Scanner sc=new Scanner(System.in); int n; n=sc.nextInt(); int required=0; if(n<6) { required=6-n; } if(required>=3) { System.out.println(required); } else { String s; s=sc.next(); int u=0; int l=0; int sp=0; int nm=0; for(int i=0;i=48 && ascii<=57) { nm=1; } else if(ascii>=65 && ascii<=90) { u=1; } else if(ascii>=97 && ascii<=122) { l=1; } else { sp=1; } } int req=0; if(u==0) { req++; } if(l==0) { req++; } if(sp==0) { req++; } if(nm==0) { req++; } System.out.println(Math.max(required,req)); } } }