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