Which is the largest Fibonacci number that can be constructed using the available set of digits C_0, C_1, C_2, \ldots, C_9, where C_0 is the number of digit s, C_1 is the number of digit s, ..., C_9 is the number of digit s?
A single line contains integers, each representing the number of times the corresponding digit appears in the set. All input numbers do not exceed .
Output the index of the largest Fibonacci number that can be constructed, or if it is impossible to construct such a number using the given digits.
Example 1