from collections import * from itertools import * from functools import * from heapq import * import sys,math input = sys.stdin.readline M = int(input()) S = [int(input()) for _ in range(1<