#!/bin/python3 import sys def minimumNumber(n, password): # Return the minimum number of characters to make the password strong numbers = set('0123456789') lower_case = set('abcdefghijklmnopqrstuvwxyz') upper_case = set('ABCDEFGHIJKLMNOPQRSTUVWXYZ') special_characters = set('!@#$%^&*()-+') extra_count = 0 if not numbers.intersection(password): extra_count += 1 if not lower_case.intersection(password): extra_count += 1 if not upper_case.intersection(password): extra_count += 1 if not special_characters.intersection(password): extra_count += 1 return max(extra_count, 6-n) if __name__ == "__main__": n = int(input().strip()) password = input().strip() answer = minimumNumber(n, password) print(answer)