/* * Author- Priyam Vora * BTech 2nd Year DAIICT */ import java.awt.Checkbox; import java.awt.Point; import java.awt.event.PaintEvent; import java.io.*; import java.math.*; import java.util.*; import java.util.Map.Entry; import java.util.concurrent.PriorityBlockingQueue; import javax.print.attribute.SetOfIntegerSyntax; import javax.swing.plaf.FontUIResource; public class Main{ private static InputStream stream; private static byte[] buf = new byte[1024]; private static int curChar; private static int numChars; private static SpaceCharFilter filter; private static PrintWriter pw; private static long count = 0,mod=(long)2e9+33; // private static TreeSet ts=new TreeSet[200000]; public final static int INF = (int) 1E9; public static void main(String args[]) { InputReader(System.in); pw = new PrintWriter(System.out); new Thread(null ,new Runnable(){ public void run(){ try{ solve(); pw.close(); } catch(Exception e){ e.printStackTrace(); } } },"1",1<<26).start(); } static StringBuilder sb; public static void test() throws IOException{ sb=new StringBuilder(); int t=nextInt(); while(t-->0){ solve(); //pw.println(); //sb.append("\n"); } // pw.println(sb); } public static long pow(long n, long p,long mod) { if(p==0) return 1; if(p==1) return n%mod; if(p%2==0){ long temp=pow(n, p/2,mod); return (temp*temp)%mod; }else{ long temp=pow(n,p/2,mod); temp=(temp*temp)%mod; return(temp*n)%mod; } } public static long pow(long n, long p) { if(p==0) return 1; if(p==1) return n; if(p%2==0){ long temp=pow(n, p/2); return (temp*temp); }else{ long temp=pow(n,p/2); temp=(temp*temp); return(temp*n); } } public static void Merge(long a[],int p,int r){ if(p adj[]; static boolean Visited[]; static HashSet exc; static long oddsum[]=new long[1000001]; static long co=0,ans=0; private static void buildgraph(int n){ adj=new LinkedList[n+1]; Visited=new boolean[n+1]; levl=new int[n+1]; for(int i=0;i<=n;i++){ adj[i]=new LinkedList(); } } static int[] levl; static int[] eat; static int n,m; static int price[]; //ind frog crab static long d,x,y; static long modInverse(long A, long M) { extendedEuclid(A,M); return (x%M+M)%M; //x may be negative } static void extendedEuclid(long A, long B) { if(B == 0) { d = A; x = 1; y = 0; } else { extendedEuclid(B, A%B); long temp = x; x = y; y = temp - (A/B)*y; } } static double distance(int x1,int y1,int x2,int y2){ return Math.sqrt((x1-x2)*(x1-x2) + (y1-y2)*(y1-y2)); } static double area(int x1, int y1, int x2, int y2, int x3, int y3) { return Math.abs((x1*(y2-y3) + x2*(y3-y1)+ x3*(y1-y2))/2.0); } static boolean isInside(int x1, int y1, int x2, int y2, int x3, int y3, int x, int y) { double A = area (x1, y1, x2, y2, x3, y3); double A1 = area (x, y, x2, y2, x3, y3); double A2 = area (x1, y1, x, y, x3, y3); double A3 = area (x1, y1, x2, y2, x, y); return (A == A1 + A2 + A3); } static int col[]; public static boolean isVowel(char c){ if(c=='a' || c=='e'||c=='i' || c=='o' || c=='u') return true; return false; } static Stack st[]; static Queue q[]; static long cost[],startt[],endt[]; static TreeSet ts=new TreeSet(); public static void solve() throws IOException{ int n=nextInt(); String s=nextLine(); String numbers = "0123456789"; String lower_case = "abcdefghijklmnopqrstuvwxyz"; String upper_case = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"; String special_characters = "!@#$%^&*()-+"; boolean b1=false,b2=false,b3=false,b4=false; for(int i=0;i=0){ b1=true; } if(lower_case.indexOf(c)>=0) b2=true; if(upper_case.indexOf(c)>=0) b3=true; if(special_characters.indexOf(c)>=0) b4=true; } int cnt=0; if(!b1){ cnt++; } if(!b2){ cnt++; } if(!b3){ cnt++; } if(!b4){ cnt++; } //pw.println(cnt); if(s.length()>=6){ pw.println(cnt); }else{ pw.println(cnt+Math.max(0, 6-(cnt+s.length()))); } } static boolean getString (char[][] matrix, int x, int y, char[] target) { if (matrix == null || matrix.length == 0 || matrix[0].length == 0) { return false; } if (target == null || target.length == 0) { return false; } if (matrix[x][y] != target[0]) { return false; } int row = matrix.length; int column = matrix[0].length; int[] dirx = {0, 0, 1, -1, 1, 1, -1, -1}; // array, int[]!!!! int[] diry = {1, -1, 0, 0, 1, -1, 1, -1}; // array, int[]!!!! for (int i = 0; i < 8; i++) { int nextx = x; // define !! int nexty = y; // define !! int k = 1; while (k < target.length) { nextx += dirx[i]; nexty += diry[i]; if (nextx < 0 || nexty < 0 || nextx >= row || nexty >= column) { break; } if (matrix[nextx][nexty] != target[k]) { break; } k++; } if (k == target.length) { return true; } } return false; } static int no_vert=0,timer=1; private static void dfs(int s){ Visited[s]=true; no_vert++; for(int x:adj[s]){ if(!Visited[x]){ dfs(x); } } // endt[s]=timer++; } private static boolean Check(int x,int y,int n){ if(x>=0 && x=0 && y pri[],pri2[]; private static void dfs(int curr,int par,int co){ Visited[curr]=true; for(int x:adj[curr]){ if(!Visited[x]){ dfs(x,curr,co); } } if(col[curr]==0){ dp[curr]++; }else{ dp[curr]--; } if(dp[curr]>0){ pri[par].add(curr); dp[par]+=dp[curr]; } } private static void dfs3(int curr,int par,int co){ Visited[curr]=true; for(int x:adj[curr]){ if(!Visited[x]){ dfs3(x,curr,co); } } if(col[curr]==1){ dp2[curr]++; }else{ dp2[curr]--; } if(dp2[curr]>0){ pri2[par].add(curr); dp2[par]+=dp2[curr]; } } public static String reverseString(String s) { StringBuilder sb = new StringBuilder(s); sb.reverse(); return (sb.toString()); } /* private static void BFS(int sou){ Queue q=new LinkedList(); q.add(sou); Visited[sou]=true; levl[sou]=0; while(!q.isEmpty()){ int top=q.poll(); for(int i:adj[top]){ //pw.println(i+" "+top); if(!Visited[i]) { q.add(i); levl[i]=levl[top]+1; } Visited[i]=true; } } }*/ static int indeg[]; /* private static void kahn(int n){ PriorityQueue q=new PriorityQueue(); for(int i=1;i<=n;i++){ if(indeg[i]==0){ q.add(i); } } while(!q.isEmpty()){ int top=q.poll(); st.push(top); for(Node i:adj[top]){ indeg[i.to]--; if(indeg[i.to]==0){ q.add(i.to); } } } } static int state=1; static long no_exc=0,no_vert=0; static Stack st; static HashSet inset; /* private static void topo(int curr){ Visited[curr]=true; inset.add(curr); for(int x:adj[curr]){ if(adj[x].contains(curr) || inset.contains(x)){ state=0; return; } if(state==0) return; } st.push(curr); inset.remove(curr); }*/ static HashSet hs; static boolean prime[]; static int spf[]; public static void sieve(int n){ prime=new boolean[n+1]; spf=new int[n+1]; Arrays.fill(spf, 1); Arrays.fill(prime, true); prime[1]=false; spf[2]=2; for(int i=4;i<=n;i+=2){ spf[i]=2; } for(int i=3;i<=n;i+=2){ if(prime[i]){ spf[i]=i; for(int j=2*i;j<=n;j+=i){ prime[j]=false; if(spf[j]==1){ spf[j]=i; } } } } } // To Get Input // Some Buffer Methods public static void sort(long a[]){ Merge(a, 0, a.length-1); } public static void InputReader(InputStream stream1) { stream = stream1; } private static boolean isWhitespace(int c) { return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1; } private static boolean isEndOfLine(int c) { return c == '\n' || c == '\r' || c == -1; } private static int read() { if (numChars == -1) throw new InputMismatchException(); if (curChar >= numChars) { curChar = 0; try { numChars = stream.read(buf); } catch (IOException e) { throw new InputMismatchException(); } if (numChars <= 0) return -1; } return buf[curChar++]; } private static int nextInt() { int c = read(); while (isSpaceChar(c)) c = read(); int sgn = 1; if (c == '-') { sgn = -1; c = read(); } int res = 0; do { if (c < '0' || c > '9') throw new InputMismatchException(); res *= 10; res += c - '0'; c = read(); } while (!isSpaceChar(c)); return res * sgn; } private static long nextLong() { int c = read(); while (isSpaceChar(c)) c = read(); int sgn = 1; if (c == '-') { sgn = -1; c = read(); } long res = 0; do { if (c < '0' || c > '9') throw new InputMismatchException(); res *= 10; res += c - '0'; c = read(); } while (!isSpaceChar(c)); return res * sgn; } private static String nextToken() { int c = read(); while (isSpaceChar(c)) c = read(); StringBuilder res = new StringBuilder(); do { res.appendCodePoint(c); c = read(); } while (!isSpaceChar(c)); return res.toString(); } private static String nextLine() { int c = read(); while (isSpaceChar(c)) c = read(); StringBuilder res = new StringBuilder(); do { res.appendCodePoint(c); c = read(); } while (!isEndOfLine(c)); return res.toString(); } private static int[] nextIntArray(int n) { int[] arr = new int[n]; for (int i = 0; i < n; i++) { arr[i] = nextInt(); } return arr; } private static long[][] next2dArray(int n, int m) { long[][] arr = new long[n][m]; for (int i = 0; i < n; i++) { for (int j = 0; j < m; j++) { arr[i][j] = nextLong(); } } return arr; } private static char[][] nextCharArray(int n,int m){ char [][]c=new char[n][m]; for(int i=0;i0 && larg[prev_ind]!=0){ union(prev_ind,ind); } if(next_ind{ long dist,fuel,w; String s; int wei; Pair(String s,int wei){ this.s=s; this.wei=wei; } @Override public int compareTo(Pair o) { // TODO Auto-generated method stub if(o.wei==wei){ return s.compareTo(o.s); } return (int)(o.wei-wei); } }