import sys input = lambda : sys.stdin.readline().rstrip() sys.setrecursionlimit(max(1000, 10**9)) write = lambda x: sys.stdout.write(x+"\n") n = int(input()) a = [int(input()) for _ in range(n)] a.sort() ans = 0 j = 0 for i in range(n): while j+1