#include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #define X first #define Y second #define pb push_back #define rep(X,Y) for (int (X) = 0;(X) < (Y);++(X)) #define reps(X,S,Y) for (int (X) = S;(X) < (Y);++(X)) #define rrep(X,Y) for (int (X) = (Y)-1;(X) >=0;--(X)) #define rreps(X,S,Y) for (int (X) = (Y)-1;(X) >= (S);--(X)) #define repe(X,Y) for ((X) = 0;(X) < (Y);++(X)) #define peat(X,Y) for (;(X) < (Y);++(X)) #define all(X) (X).begin(),(X).end() #define rall(X) (X).rbegin(),(X).rend() #define eb emplace_back #define UNIQUE(X) (X).erase(unique(all(X)),(X).end()) #define Endl endl #define NL <<"\n" using namespace std; using ll=__int128_t; using pii=pair; using pll=pair; template using vv=vector>; template inline bool MX(T &l,const T &r){return l inline bool MN(T &l,const T &r){return l>r?l=r,1:0;} //#undef NUIP #ifdef NUIP #include "benri.h" #else #define out(args...) #endif #ifdef __cpp_init_captures templatevector table(int n, T v){ return vector(n, v);} template auto table(int n, Args... args){auto val = table(args...); return vector(n, move(val));} #endif const ll MOD=1e9+7; //998244353 int main(){ ios_base::sync_with_stdio(false); cin.tie(0); cout<>x>>y>>h; x*=1000; y*=1000; int re=0; set> memo; memo.emplace(x,y,h,0); queue> que; que.emplace(x,y,h,0); while(que.size()){ auto [x,y,h,c]=que.front(); que.pop(); // out(x,y,h,c,1); MX(re,c); if(memo.emplace(y,x,h,c).Y) que.emplace(y,x,h,c); if(x>=h && memo.emplace(x,y*2,h*4,c+1).Y) que.emplace(x,y*2,h*4,c+1); } cout<