using System; using System.Collections.Generic; using System.IO; using System.Linq; class Solution { static int minimumNumber(int n, string password) { var numbers = "0123456789"; var lower_case = "abcdefghijklmnopqrstuvwxyz"; var upper_case = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"; var special_characters = "!@#$%^&*()-+"; bool un=false,ul=false,uu=false,us=false; foreach(var c in password) { if (numbers.IndexOf(c)>=0) un=true; if (lower_case.IndexOf(c)>=0) ul=true; if (upper_case.IndexOf(c)>=0) uu=true; if (special_characters.IndexOf(c)>=0) us=true; } var min = Math.Max(6-n,0); var needed = (un?0:1) + (ul?0:1) + (uu?0:1) + (us?0:1); return Math.Max(min, needed); // Return the minimum number of characters to make the password strong } static void Main(String[] args) { int n = Convert.ToInt32(Console.ReadLine()); string password = Console.ReadLine(); int answer = minimumNumber(n, password); Console.WriteLine(answer); } }