{"raw_statement":[{"iden":"statement","content":"A well-known Berland online games store has announced a great sale! Buy any game today, and you can download more games for free! The only constraint is that the total price of the games downloaded for free can't exceed the price of the bought game.\n\nWhen Polycarp found out about the sale, he remembered that his friends promised him to cover any single purchase in GameStore. They presented their promise as a gift for Polycarp's birthday.\n\nThere are n games in GameStore, the price of the i-th game is pi. What is the maximum number of games Polycarp can get today, if his friends agree to cover the expenses for any single purchase in GameStore?\n\nThe first line of the input contains a single integer number n (1 ≤ n ≤ 2000) — the number of games in GameStore. The second line contains n integer numbers p1, p2, ..., pn (1 ≤ pi ≤ 105), where pi is the price of the i-th game.\n\nPrint the maximum number of games Polycarp can get today.\n\nIn the first example Polycarp can buy any game of price 5 or 6 and download games of prices 1 and 3 for free. So he can get at most 3 games.\n\nIn the second example Polycarp can buy any game and download the other one for free.\n\n"},{"iden":"input","content":"The first line of the input contains a single integer number n (1 ≤ n ≤ 2000) — the number of games in GameStore. The second line contains n integer numbers p1, p2, ..., pn (1 ≤ pi ≤ 105), where pi is the price of the i-th game."},{"iden":"output","content":"Print the maximum number of games Polycarp can get today."},{"iden":"examples","content":"Input55 3 1 5 6Output3Input27 7Output2"},{"iden":"note","content":"In the first example Polycarp can buy any game of price 5 or 6 and download games of prices 1 and 3 for free. So he can get at most 3 games.In the second example Polycarp can buy any game and download the other one for free."}],"translated_statement":null,"sample_group":[],"show_order":[],"formal_statement":"**Definitions**  \nLet $ s \\in \\{0,1\\}^* $ be the encrypted string, with $ 8 \\leq |s| \\leq 8 \\times 10^4 $.\n\n**Constraints**  \nEach character of $ s $ is either $ 0 $ or $ 1 $.\n\n**Objective**  \nDecrypt $ s $ to recover the original string.  \n\n*(Note: The decryption algorithm is unspecified; formalization requires the algorithm. Without it, the objective cannot be mathematically defined.)*","simple_statement":"Decrypt the binary string to get the original message.","has_page_source":false}