import bisect n = int(input()) a = sorted([int(input()) for _ in range(n)]) ans = 0 i = 0 while i < n: ans += 1 current = a[i] while True: next_pos = bisect.bisect_right(a, current + 1) if next_pos >= n: break current = a[next_pos] i = next_pos i += 1 print(ans)