#include <bits/stdc++.h>
using namespace std;
int main() {
  int64_t x, y, m, k;
  cin >> x >> y >> m;
  int64_t check = x + y;
  k = 0;
  while (max(x, y) < m) {
    if (x < y && y != 0) {
      int64_t t = (y - x) / y;
      if (t == 0) t = 1;
      x += t * y;
      k += t;
    } else if (x != 0) {
      int64_t t = (x - y) / x;
      if (t == 0) t = 1;
      y += t * x;
      k += t;
    }
    if (x + y <= check) {
      cout << -1 << endl;
      return 0;
    }
    check = x + y;
  }
  cout << k << endl;
  return 0;
}
