import java.io.*; public class Main { private static Object unexpected = null; private static final int mod = (int) 1E9 + 7; private static final int ibufsize = (1 << 15), obufsize = (1 << 15); private static int iNextByte, iNextIndex, iReadByteCount, oNextIndex; private static final byte ibuf[] = new byte[ibufsize], obuf[] = new byte[obufsize]; private static InputStream is = System.in; private static OutputStream os = System.out; private Main() throws Exception { if (inFromFile) is = new FileInputStream(new File("").getAbsolutePath() + "/testdata/in.txt"); if (outToFile) os = new FileOutputStream(new File("").getAbsolutePath() + "/testdata/out.txt"); nextByte(); solve(); is.close(); flushOutBuf(); } public static void main(String[] args) { try { new Main(); } catch (Exception e) { e.printStackTrace(); } } private boolean is_digit(int cp) { return '0' <= cp && cp <= '9'; } private boolean is_lowercase(int cp) { return 'a' <= cp && cp <= 'z'; } private boolean is_uppercase(int cp) { return 'A' <= cp && cp <= 'Z'; } private boolean is_alphabet(int cp) { return ('a' <= cp && cp <= 'z') || ('A' <= cp && cp <= 'Z'); } private boolean is_alphanumberic(char ch) { return (ch >= '0' && ch <= '9') || (ch >= 'a' && ch <= 'z') || (ch >= 'A' || ch <= 'Z'); } private boolean is_whitespace(int cp) { return cp == ' ' || cp == '\r' || cp == '\n' || cp == '\t'; } private boolean is_word_separator(int cp) { return cp == ' ' || cp == '\r' || cp == '\n' || cp == '\t'; } private boolean is_line_separator(int cp) { return cp == '\n' || cp == '\r'; } private boolean is_unexpected() { return unexpected != null; } private Object set_unexpected(Object value) { return (unexpected = value); } private boolean is_negative() throws IOException { boolean minus = false; while (iNextByte == '+' || iNextByte == '-') { if (iNextByte == '-') minus = !minus; nextByte(); } return minus; } private int nextByte() throws IOException { if (iNextIndex >= iReadByteCount) { iReadByteCount = is.read(ibuf, 0, ibufsize); if (iReadByteCount == -1) return (iNextByte = -1); iNextIndex = 0; } return (iNextByte = ibuf[iNextIndex++]); } private char nc() throws IOException { return (char) nextByte(); } private char[] nc(int n) throws IOException { char a[] = new char[n]; for (int i = 0; i < n; ++i) a[i] = nc(); return a; } private char[][] nc(int r, int c) throws IOException { char a[][] = new char[r][c]; for (int i = 0; i < r; ++i) a[i] = nc(c); return a; } private int ni() throws IOException { while (is_whitespace(iNextByte)) nextByte(); int res = 0; boolean minus = is_negative(); if (!is_digit(iNextByte)) return (int) set_unexpected(-1); do {res = (res << 1) + (res << 3) + iNextByte - '0';} while (is_digit(nextByte())); return minus ? -res : res; } private int[] ni(int n) throws IOException { int a[] = new int[n]; for (int i = 0; i < n; ++i) a[i] = ni(); return a; } private int[][] ni(int r, int c) throws IOException { int a[][] = new int[r][c]; for (int i = 0; i < r; ++i) a[i] = ni(c); return a; } private long nl() throws IOException { while (is_whitespace(iNextByte)) nextByte(); long res = 0; boolean minus = is_negative(); if (!is_digit(iNextByte)) return (long) set_unexpected(-1); do {res = (res << 1) + (res << 3) + iNextByte - '0';} while (is_digit(nextByte())); return minus ? -res : res; } private long[] nl(int n) throws IOException { long a[] = new long[n]; for (int i = 0; i < n; ++i) a[i] = nl(); return a; } private long[][] nl(int r, int c) throws IOException { long a[][] = new long[r][c]; for (int i = 0; i < r; ++i) a[i] = nl(c); return a; } private double nd() throws IOException { while (is_whitespace(iNextByte)) nextByte(); boolean minus = is_negative(); if (!is_digit(iNextByte)) return (double) set_unexpected(-1.0); double decimal = 0, floating = 0, div = 1; do {decimal = 10 * decimal + (iNextByte - '0');} while (is_digit(nextByte())); if (iNextByte == '.') while (is_digit(nextByte())) floating += (iNextByte - '0') / (div *= 10); double res = decimal + floating; return minus ? -res : res; } private double[] nd(int n) throws IOException { double a[] = new double[n]; for (int i = 0; i < n; ++i) a[i] = nd(); return a; } private double[][] nd(int r, int c) throws IOException { double a[][] = new double[r][c]; for (int i = 0; i < r; ++i) a[i] = nd(c); return a; } private String line() throws IOException { while (is_whitespace(iNextByte)) nextByte(); StringBuilder sb = new StringBuilder(); while (iNextByte != -1 && !is_line_separator(iNextByte)) { sb.append((char) iNextByte); nextByte(); } return sb.toString(); } private String ns() throws IOException { while (is_word_separator(iNextByte)) nextByte(); StringBuilder sb = new StringBuilder(); while (iNextByte != -1 && !is_word_separator(iNextByte)) { sb.append((char) iNextByte); nextByte(); } return sb.toString(); } private String[] ns(int n) throws IOException { String a[] = new String[n]; for (int i = 0; i < n; ++i) a[i] = ns(); return a; } private String[][] ns(int r, int c) throws IOException { String a[][] = new String[r][c]; for (int i = 0; i < r; ++i) a[i] = ns(c); return a; } private void flushOutBuf() { if (oNextIndex == 0) return; try { os.write(obuf, 0, oNextIndex); os.flush(); oNextIndex = 0; } catch (Exception e) { e.printStackTrace(); } } private void puts(String format, Object... args) { if (args != null) format = String.format(format, args); for (int i = 0, n = format.length(); i < n; ++i) { obuf[oNextIndex++] = (byte) format.charAt(i); if (oNextIndex >= obufsize) flushOutBuf(); } } private void print(T ob) { puts(ob + ""); } private void print(String format, Object... args) { puts(format, args); } private void println(T ob) { puts(ob + "\n"); } private void println(String format, Object... args) { puts(format + "\n", args); } private void debug(T ob) { puts("\u001B[31m" + ob + "\u001B[0m"); } private void debug(String format, Object... args) { puts("\u001B[31m" + format + "\u001B[0m", args); } private void debugln(T ob) { puts("\u001B[31m" + ob + "\u001B[0m\n"); } private void debugln(String format, Object... args) { puts("\u001B[31m" + format + "\u001B[0m\n", args); } private static final boolean inFromFile = false, outToFile = false; private void solve() throws Exception { int n = ni(); char a[] = ns().toCharArray(); String spec = "!@#$%^&*()-+"; int ans = 0; boolean ok1 = false, ok2 = false,ok3 = false, ok4 = false; for(int i = 0; i < a.length; ++i) { if(is_digit(a[i])) { ok1 = true; } if(is_uppercase(a[i])) { ok2 = true; } if(is_lowercase(a[i])) { ok3 = true; } if(spec.contains(a[i]+"")) { ok4 = true; } } if(!ok1) ++ans;if(!ok2) ++ans;if(!ok3) ++ans;if(!ok4) ++ans; if(a.length + ans < 6) ans += (6-ans-a.length); println(ans); } }