Byteasar has bought n bricks and numbered them 1 through n. Every brick has the same height, but their widths may differ: brick i has width wi.
He wants to stack all of the bricks into a multi-level tower under the following rules:
The height of the tower is its number of levels. Find the maximum height Byteasar can build.
The first line contains an integer n (1≤n≤100000), the number of bricks. The second line contains n integers w1,w2,…,wn (1≤wi≤10000), where wi is the width of brick i.
Print one integer: the maximum possible height of the tower.
Take the three bricks with widths 1, 2, 3. Put bricks 1 and 2 on the bottom level, giving it width 1+2=3, and put brick 3 on the top level, giving it width 3. Since 3 does not exceed 3, this tower is valid and has height 2.