#include using namespace std; #define lli long long int #define uli unsigned long long int #define INF 99999999999 #define rep(i,m,n) for(lli i = m;i < n;i++) #define rrep(i,m,n) for(lli i=m-1;i>=n;i--) #define pb(n) push_back(n) #define UE(N) N.erase(unique(N.begin(),N.end()),N.end()); #define Sort(n) sort(n.begin(), n.end()) #define Rev(n) reverse(n.begin(),n.end()) #define Out(S) cout << S << endl #define NeOut(S) cout << S #define HpOut(S) cout << setprecision(150) << S << endl #define Vec(K,L,N,S) vector K(N,S) #define DV(K,L,N,M,S) vector> K(N,vector(M,S)) #define TV(K,L,N,M,R,S) vector>> K(N,vector>(M,vector(R,S))) #define pint pair #define paf(L,R) pair #define mod 1000000007 #define MAX 5100000 #define chmax(a, b) a = (((a)<(b)) ? (b) : (a)) #define chmin(a, b) a = (((a)>(b)) ? (b) : (a)) int attack(int A,int B){ if(!A||!B)return -1; else return (A+B)%5; } pint marge(int A,int B,bool C){ int P=A+B; if(C&&P<4||C&&P==5||P==0)return pint(-1,-1); else{ if(!C&&P>5)P%=5; if(!C){ if(P==1)A=1; else if(P==2)if(A==1)A=2;else A=1; else if(P==3)if(A==0||A==3)A=2;else A=3; else if(P==4)if(A==2||A%2==1)A=4;else A=2; else if(P==5)if(A==2||A==3)A=4;else A=3; }else{ if(P==4)if(A%2==0)A=3;else A=2; else if(P==6)if(A%2==0)A=3;else A=4; else if(P==7)A=P=2; else if(P==8){A=2;P=3;} } return pint(A,P-A); } } tuple solve(int L1,int R1,int L2,int R2,int E,int flag){ if(!E)if(!flag)L2=attack(L1,L2);else L1=attack(L1,L2); else if(E==1)if(!flag)R2=attack(L1,R2);else L1=attack(L1,R2); else if(E==2)if(!flag)L2=attack(R1,L2);else R1=attack(R1,L2); else if(E==3)if(!flag)R2=attack(R1,R2);else R1=attack(R1,R2); else if(E==4)if(!flag)pint(L1,L2)=marge(L1,L2,0);else pint(R1,R2)=marge(R1,R2,0); else if(E==5)if(!flag)pint(L1,L2)=marge(L1,L2,1);else pint(R1,R2)=marge(R1,R2,1); return make_tuple(L1,R1,L2,R2); } int main(){ lli A,B,C,D,E,F,N,M,K,L,R,X,Y,H,W,sum=0,num=0,flag=0;string S,T; cin >> X >> Y >> H; long double x=1000*X,y=1000*Y; while(x>H||y>H){ if(x>y)if(y>H)y/=2;else x/=2; else if(y>=x)if(x>H)x/=2;else y/=2; sum++; H*=2; } Out(sum); }