n = input() a = map(int,raw_input().split()) a.sort() ans = 0 for j in range(n): ans += (1<