A transposition of a deck of cards is the following sequence of operations:
You are given a deck of cards with numbers. You can look at the cards, so you know all numbers on all cards. Your task is to find a transposition which gives the greatest amount of points. We get 1 point whenever the sum of the cards thrown away so far is divisible by 100. If two transpositions give the same score, the one in which the first card thrown away has a lower value is better. If we still have a draw, the second card decides, and so on.
Input
The first line contains a single number N — how many cards there are in the deck (1 ≤ N ≤ 200).
The (i+1)-th row, 1≤ i≤ N, contains a single integer ki, which is the value of the i-th card (−999 ≤ ki ≤ 999).
Output
In the first row output the score (the number of points received). In the second row output c1 c2 c3 … cN, where ci is the i-th card thrown away when using the optimal way of transposing the deck.
Input
9 80 50 20 90 40 30 70 60 10
Output
3 40 60 50 20 30 10 90 70 80