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