The index of a Fibonacci number

The index of a Fibonacci number. The Fibonacci sequence is defined as follows:

ϕ0=0, ϕ1=1, ϕn=ϕn−1+ϕn−2.

Given an integer a, determine its index among the Fibonacci numbers. Print the number n such that ϕn=a. If a is not a Fibonacci number, print -1.

Test Case Input (a) Expected Output
1 0 0
2 1 1
3 10 -1
4 8 6