Lazdynas
InterviewTime limit1sMemory limit1024 MB
Given N nut coordinates, find the maximum number of nuts Squirrel Vytis can catch when the tree chooses the drop order.
Problem
A friendly hazel tree grows near the home of the squirrel Vytis and drops nuts for him. Vytis starts at position 0. Nuts hang high on a horizontal branch of the tree, and the nuts are at coordinates . The tree drops the nuts one at a time, and the effect of each drop is as follows. If a nut falls to the left or right of Vytis, he moves one position in that direction and does not catch the nut. If a nut falls exactly on Vytis's head, he catches it and does not move. The tree chooses the order of the drops so that Vytis catches as many nuts as possible.
Input
The first line contains the number of nuts . Each of the next lines contains one integer, where the integer on line is the coordinate of the -th nut.
Output
Print one integer, the maximum number of nuts Vytis can collect.
Constraints
, and each satisfies .