#!/bin/python3 import sys def minimumNumber(n, password): # Return the minimum number of characters to make the password strong numbers = "0123456789" numbers = list(numbers) lower_case = "abcdefghijklmnopqrstuvwxyz" lower_case = list(lower_case) upper_case = "ABCDEFGHIJKLMNOPQRSTUVWXYZ" upper_case = list(upper_case) special_characters = "!@#$%^&*()-+" special_characters = list(special_characters) count = 0 flag1 = False flag2 = False flag3 = False flag4 = False flag5 = False for i in range(n): if password[i] in numbers: flag2 = True if password[i] in lower_case: flag3 = True if password[i] in upper_case: flag4 = True if password[i] in special_characters: flag5 = True if not flag2: count += 1 n += 1 if not flag3: count += 1 n += 1 if not flag4: count += 1 n += 1 if not flag5: count += 1 n += 1 if n > 6: flag1 = True else: count += 6-n return(count) if __name__ == "__main__": n = int(input().strip()) password = input().strip() answer = minimumNumber(n, password) print(answer)