\(A\), \(B\), and \(C\) are three friends. Their birth dates are in the ratio of \(1:2:4\). \(B\) forms a quadratic equation of the form \(ax^2+bx+c\), where the coefficient \(a,b\), and \(c\) are the birth date ratios, that is, \(a=1\), \(b=2\), and \(c=4\).
\(C\) is preparing for a test, he gives \(n\) online tests and stores the score of these \(n\) tests in the form of an array. \(C\) wants to arrange the scores of these \(n\) tests in a non-decreasing order such that he can show it to his friends about his improvement. He uses the following operation to perform this task:
- Select one of the test marks and multiply it with the root of the quadratic equation provided by \(B\).
Determine the minimum number of operations required to perform the task.
Input format
- First line: \(n\) denoting the number of test cases
- Second line: \(n\) integers denoting the marks obtained in each test
Output format
Print a single integer that represents the minimum number of operations that can be performed to complete the task. If it is not possible, then print \(-1\).
Constraints
\(1 \le n \le 200000\\ 1 \le A_i \le 1e^9\)