using System; using System.Collections.Generic; using System.IO; using System.Linq; class Solution { static int minimumNumber(int n, string password) { char[] numbers = ("0123456789").ToCharArray(); char[] lower_case = "abcdefghijklmnopqrstuvwxyz".ToCharArray(); var upper_case = "ABCDEFGHIJKLMNOPQRSTUVWXYZ".ToCharArray(); var special_characters = "!@#$%^&*()-+".ToCharArray(); var pass = password.ToCharArray(); int count = 0; if (pass.Where(p => numbers.Contains(p)).Count() == 0) count++; if (pass.Where(p => lower_case.Contains(p)).Count() == 0) count++; if (pass.Where(p => upper_case.Contains(p)).Count() == 0) count++; if (pass.Where(p => special_characters.Contains(p)).Count() == 0) count++; if (n + count < 6) count += 6 - n - count; return count; } static void Main(String[] args) { int n = Convert.ToInt32(Console.ReadLine()); string password = Console.ReadLine(); int answer = minimumNumber(n, password); Console.WriteLine(answer); } }