Let us call a pair of integer numbers *m*-perfect, if at least one number in the pair is greater than or equal to *m*. Thus, the pairs (3, 3) and (0, 2) are 2-perfect while the pair (-1, 1) is not.

Two integers *x*, *y* are written on the blackboard. It is allowed to erase one of them and replace it with the sum of the numbers, (*x* + *y*).

What is the minimum number of such operations one has to perform in order to make the given pair of integers *m*-perfect?
Single line of the input contains three integers *x*, *y* and *m* ( - 10<sup class="upper-index">18</sup> ≤ *x*, *y*, *m* ≤ 10<sup class="upper-index">18</sup>).

Please, do not use the %lld specifier to read or write 64-bit integers in C++. It is preffered to use the cin, cout streams or the %I64d specifier.
#!/usr/bin/env python
# -*- coding: utf-8 -*-
#
#  без имени.py
#  
#  Copyright 2014 user <user@user-Aspire-E1-531G>
#  
#  This program is free software; you can redistribute it and/or modify
#  it under the terms of the GNU General Public License as published by
#  the Free Software Foundation; either version 2 of the License, or
#  (at your option) any later version.
#  
#  This program is distributed in the hope that it will be useful,
#  but WITHOUT ANY WARRANTY; without even the implied warranty of
#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
#  GNU General Public License for more details.
#  
#  You should have received a copy of the GNU General Public License
#  along with this program; if not, write to the Free Software
#  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
#  MA 02110-1301, USA.
#  
#

#!/usr/bin/env python
# -*- coding: utf-8 -*-
#
#  без имени.py
#  
#  Copyright 2014 user <user@user-Aspire-E1-531G>
#  
#  This program is free software; you can redistribute it and/or modify
#  it under the terms of the GNU General Public License as published by
#  the Free Software Foundation; either version 2 of the License, or
#  (at your option) any later version.
#  
#  This program is distributed in the hope that it will be useful,
#  but WITHOUT ANY WARRANTY; without even the implied warranty of
#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
#  GNU General Public License for more details.
#  
#  You should have received a copy of the GNU General Public License
#  along with this program; if not, write to the Free Software
#  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
#  MA 02110-1301, USA.
#  
#

import sys
import math
  
x, y, m = [int(x) for x in (sys.stdin.readline()).split()]

res = 0

if(x == 0 and y == 0 and m != 0):
    print(-1)
    exit()

if(m > 0):
    if((x == 0 and y < 0) or (x < 0 and y == 0)):
        print(-1)
        exit()

    if(x < 0):
        res += int(math.fabs(x / y))
        if(x % y == 0):
            res += 1
        res -= 1
        x = 0

    f1 = x
    f2 = y    
    while(f2 < m):
        v = f2
        f2 += f1
        f1 = v
        res += 1
        
        
elif(m < 0):
    if(x > 0 and y > 0):
        print(-1)
        exit()
    elif(x < 0 and y < 0 and x < m and y < m):
        print(-1)
        exit()
    

    f1 = x
    f2 = y    
    while(f2 > m):
        v = f2
        f2 += f1
        f1 = v
        res += 1
      
  
        
print(res)
