#!/bin/python3 import sys def minimumNumber(n, password): count=0 numbers = "0123456789" lower_case = "abcdefghijklmnopqrstuvwxyz" upper_case = "ABCDEFGHIJKLMNOPQRSTUVWXYZ" special_characters = "!@#$%^&*()-+" list (numbers) list (lower_case) list (upper_case) list (special_characters) if not any ( x in numbers for x in password ): n=n+1 count+=1 if not any ( a in lower_case for a in password): n=n+1 count+=1 if not any ( b in upper_case for b in password): n=n+1 count+=1 if not any ( c in special_characters for c in password): n=n+1 count+=1 if n <= 6 : count+= 6-n return count if __name__ == "__main__": n = int(input().strip()) password = input().strip() answer = minimumNumber(n, password) print(answer)