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 }*/ static void Main(String[] args) { int n = Convert.ToInt32(Console.ReadLine()); string p = Console.ReadLine(); string numbers = "0123456789"; string lower = "abcdefghijklmnopqrstuvwxyz"; string upper = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"; string spe = "!@#$%^&*()-+"; int num = 0; int low = 0; int up = 0; int sp = 0; for (int i = 0; i < n; i++){ if (numbers.Contains(p[i])) num = 1; if (lower.Contains(p[i])) low = 1; if (upper.Contains(p[i])) up = 1; if (spe.Contains(p[i])) sp = 1; } int r = num + low + up + sp; int answer = 0; if (n >= 6){ if (r == 4) answer = 0; else answer = 4 - r; } else{ answer = Math.Max(6 - n, 4 - r); } //int answer = minimumNumber(n, password); Console.WriteLine(answer); } }