#include #define trace1(a) cout<<#a<<": "<=(int)(b);--(i)) #define rreps(i,a,b,c) for(int (i)=(int)(a);(i)>=(int)(b);(i)-=(c)) #define fore(x,a) for(auto &x:a) #define foreach(i,a) for(auto i=(a).begin(); i!=(a).end(); ++i) #define rforeach(i,a) for(auto i=(a).rbegin();i!=(a).rend();++i) #define all(a) (a).begin(), (a).end() #define rall(a) (a).rbegin(),(a).rend() #define isin(i,a,b) ((a) <= (i) && (i) <= (b)) #define uni(a) (a).erase(unique(all(a)),(a).end()) #define dup(x,y) (((x)+(y)-1)/(y)) #define fi first #define se second #define pb push_back #define eb emplace_back #define sz(a) ((long long)(a).size()) #define v(T) vector #define vv(T) v(v(T)) using namespace std; using ll = long long; using vi = vector; using unit= unsigned; using vl = vector; using ull = unsigned long long; using vvi = vector; using vvl = vector; using pii = pair; using vpii= vector; using pil = pair; using vpil= vector; using pli = pair; using vpli= vector; using pll = pair; using vpll= vector; void _main(); int main(){ cin.tie(0); ios::sync_with_stdio(false); _main(); } templatestring join(const v(T)&v){ stringstream s; rep(i,0,sz(v))s<<' '<istream &operator>>(istream&i, v(T)&v){ fore(x,v){ i >> v; } return i; } templateostream &operator<<(ostream&o, const v(T)&v){ o<<"["; fore(x,v)o<ostream &operator<<(ostream&o, const deque&v){ o<<"deq["; fore(x,v)o<ostream &operator<<(ostream&o, const set&v){ o<<"{"; fore(x,v)o<ostream &operator<<(ostream&o, const unordered_set&v){ o<<"{"; fore(x,v)o<ostream &operator<<(ostream&o, const multiset&v){ o<<"{"; fore(x,v)o<ostream &operator<<(ostream&o, const unordered_multiset&v){ o<<"{"; fore(x,v)o<ostream &operator<<(ostream &o, const pair&p){ o<<"("<ostream &operator<<(ostream &o, const map&m){ o<<"{"; fore(x,m)o<"<ostream &operator<<(ostream &o, const unordered_map&m){ o<<"{"; fore(x,m)o<"<void YES(T c){ if(c) cout<<"YES"<void Yes(T c){ if(c) cout<<"Yes"<< endl; else cout<<"No"<void POSS(T c){ if(c) cout<<"POSSIBLE"<void Poss(T c){ if(c) cout<<"Possible"<void chmax(T &a, const T &b){ if(avoid chmin(T &a, const T &b){ if(bT gcd(T a, T b){ return b?gcd(b,a%b):a; } templateT lcm(T a, T b){ return a/gcd(a,b)*b; } const double EPS = 1e-10; const double PI = acos(-1.0); const int INF = 1001002003; const ll LINF= 1001002003004005006LL; const int dx[] = { -1, 0, 1, 0 , -1,-1, 1, 1 }; const int dy[] = { 0, 1, 0,-1 , -1, 1,-1, 1 }; int dfs(ll x, ll y, ll h, int ans) { if (x <= h && y <= h) return ans; ++ans; if (x > h && y > h) { return max(dfs(dup(x,2),y,h*2,ans), dfs(x,dup(y,2),h*2,ans)); } if (x > h) return dfs(dup(x,2),y,h*2,ans); if (y > h) return dfs(x,dup(y,2),h*2,ans); return -1; } void _main() { ll x, y, h; cin >> x >> y >> h; x *= 1000; y *= 1000; int ans = dfs(x,y,h,0); cout << ans << endl; }