#!/bin/python3 import sys def minimumNumber(n, password): # Return the minimum number of characters to make the password strong numbers = "0123456789" lower_case = "abcdefghijklmnopqrstuvwxyz" upper_case = "ABCDEFGHIJKLMNOPQRSTUVWXYZ" special_characters = "!@#$%^&*()-+" num = True lower = True upper = True spe = True count = 0 for i in password: if numbers.find(i) != -1 and num == True: num = False if lower_case.find(i) != -1 and lower == True: lower = False if upper_case.find(i) != -1 and upper == True: upper = False if special_characters.find(i) != -1 and spe == True: spe = False if num == True: count = count + 1 if lower == True: count = count + 1 if upper == True: count = count + 1 if spe == True: count = count + 1 if count + n < 6: return 6 - n else: return count if __name__ == "__main__": n = int(input().strip()) password = input().strip() answer = minimumNumber(n, password) print(answer)