M = int(input()) lsS = [int(input()) for i in range(1<