using System; using System.Collections.Generic; using System.IO; using System.Linq; class Solution { static int minimumNumber(int n, string password) { int count = password.Length; int charCount = 0; int[] arr = new int[4]; int result = 0; foreach(char c in password) { if(c >= 48 && c <= 57) arr[0] = 1; if(c >= 65 && c <= 90) arr[1] = 1; if(c >= 97 && c <= 122) arr[2] = 1; if(c >= 33 && c <= 47) arr[3] = 1; } int i = 3; while(i >=0) { //Console.WriteLine(arr[i]); if(arr[i] == 1) charCount++; i--; } if(charCount < 4) result = 4 - charCount; if(count + result < 6) { result = 6 - count; } return result; } static void Main(String[] args) { int n = Convert.ToInt32(Console.ReadLine()); string password = Console.ReadLine(); int answer = minimumNumber(n, password); Console.WriteLine(answer); } }