#!/bin/python3 import sys import re def minimumNumber(n, password): count = 0 if not bool(re.search(r'[\!\@\#\$\%\^\&\*\(\)\-\+]', password)): count += 1 if not bool(re.search(r'[\d]', password)): count += 1 if not bool(re.search(r'[a-z]', password)): count += 1 if not bool(re.search(r'[A-Z]', password)): count +=1 if 6 - n > count: return 6 - n else: return count # Return the minimum number of characters to make the password strong # 6 length is at least . #It contains at least one digit. # It contains at least one lowercase English character. # It contains at least one uppercase English character. # It contains at least one special character. The special characters are: !@#$%^&*()-+ if __name__ == "__main__": n = int(input().strip()) password = input().strip() answer = minimumNumber(n, password) print(answer)