using System; using System.Collections.Generic; using System.Text.RegularExpressions; using System.IO; using System.Linq; class Solution { static int minimumNumber(int n, string password) { var r = 0; if (!Regex.IsMatch(password, @"[0-9]")) r++; if (!Regex.IsMatch(password, @"[a-z]")) r++; if (!Regex.IsMatch(password, @"[A-Z]")) r++; var special = false; var chars = new List {'!', '@', '#', '$', '%', '^', '&', '*', '(', ')', '-', '+'}; if (!chars.Intersect(password).Any()) r++; var x = password.Length + r; if (x >= 6) return r; else return r + 6 - x; } static void Main(String[] args) { int n = Convert.ToInt32(Console.ReadLine()); string password = Console.ReadLine(); int answer = minimumNumber(n, password); Console.WriteLine(answer); } }