You are organizing a canoe tour. Canoes can be hired at the harbour, and all of them are identical. A single canoe holds at most two people, and the combined weight of the people in it cannot exceed a fixed maximum. To keep the cost as low as possible, you must seat every participant using as few canoes as possible.
Write a program that:
The first line contains one integer w, the maximum weight of a canoe crew (80≤w≤200). The second line contains one integer n, the number of participants (1≤n≤30000).
Each of the next n lines contains one integer, the weight of a participant, which is between 5 and w inclusive.
Print a single integer on the first line: the minimum number of canoes that must be hired.