#include using namespace std::literals::string_literals; using i64 = std::int_fast64_t; using std::cout; using std::cerr; using std::endl; using std::cin; template std::vector make_v(size_t a){return std::vector(a);} template auto make_v(size_t a,Ts... ts){ return std::vector(ts...))>(a,make_v(ts...)); } int main() { i64 x, y, h; scanf("%lld%lld%lld", &x, &y, &h); x *= 1000; y *= 1000; auto dp = make_v(32, 32); dp[0][0] = true; for(int i = 0; i < 32; i++) { for(int j = 0; j < 32; j++) { if(!dp[i][j]) continue; i64 H = h << (i + j); i64 X = x >> i, Y = y >> j; if(X >= H) dp[i + 1][j] = true; if(Y >= H) dp[i][j + 1] = true; } } int ans = 0; for(int i = 0; i < 32; i++) for(int j = 0; j < 32; j++) if(dp[i][j]) ans = std::max(ans, i + j); printf("%d\n", ans); return 0; }