#!/bin/python3 import sys import re 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 = "[!@#$%/^&/*/(/)-/+]" l1=len(re.findall(numbers, password)) l2=len(re.findall(lower_case, password)) l3=len(re.findall(upper_case, password)) l4=len(re.findall(special_characters, password)) c=0 if(l1==0): c+=1 if(l2==0): c+=1 if(l3==0): c+=1 if(l4==0): c+=1 if((n+c)<6): c+= 6-(n+c) return c ''' print(password) print(l1) print(l2) print(l3) print(l4) ''' if __name__ == "__main__": n = int(input().strip()) password = input().strip() answer = minimumNumber(n, password) print(answer)