#include <bits/stdc++.h>
#pragma GCC optimize("O3")
using namespace std;
const int MAX = 2e5 + 5;
const long long MAX2 = 11;
const int MOD = 998244353;
const long long INF = 2e18;
const int dr[] = {1, 0, -1, 0, 1, 1, -1, -1, 0};
const int dc[] = {0, 1, 0, -1, 1, -1, 1, -1, 0};
const double pi = acos(-1);
const double EPS = 1e-9;
long long a, b, m, cnt;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  cin >> a >> b >> m;
  if (a < m && b < m && a < 1 && b < 1) return cout << -1, 0;
  while (a < m && b < m) {
    if (a > b) swap(a, b);
    if (a < -b)
      cnt -= a / b, a %= b;
    else
      cnt++, a += b;
  }
  cout << cnt << "\n";
  return 0;
}
