using System; using System.Collections.Generic; using System.IO; using System.Linq; class Solution { static int minimumNumber(int n, string password) { // Return the minimum number of characters to make the password strong int charNeed = 0; bool hasDigit = password.Any(x => Char.IsDigit(x)); bool hasLower = password.Any(x => Char.IsLower(x)); bool hasUpper = password.Any(x => Char.IsUpper(x)); bool hasSpecial = password.Any(x => "!@#$%^&*()-+".Contains(x)); if (!hasDigit) charNeed++; if (!hasLower) charNeed++; if (!hasUpper) charNeed++; if (!hasSpecial) charNeed++; int len = password.Length; if (len >= 6) { return charNeed; } else { return Math.Max(6 - len, charNeed); } } static void Main(String[] args) { int n = Convert.ToInt32(Console.ReadLine()); string password = Console.ReadLine(); int answer = minimumNumber(n, password); Console.WriteLine(answer); } }