#include #define ALL(v) std::begin(v), std::end(v) #define ALLR(v) std::rbegin(v), std::rend(v) using ll = std::int64_t; using ull = std::uint64_t; using pii = std::pair; using tii = std::tuple; using pll = std::pair; using tll = std::tuple; template using vec = std::vector; template using vvec = vec>; template const T& var_min(const T &t) { return t; } template const T& var_max(const T &t) { return t; } template const T& var_min(const T &t, const Tail&... tail) { return std::min(t, var_min(tail...)); } template const T& var_max(const T &t, const Tail&... tail) { return std::max(t, var_max(tail...)); } template void chmin(T &t, const Tail&... tail) { t = var_min(t, tail...); } template void chmax(T &t, const Tail&... tail) { t = var_max(t, tail...); } template const T& clamp(const T &t, const T &low, const T &high) { return std::max(low, std::min(high, t)); } template void chclamp(T &t, const T &low, const T &high) { return t = clamp(t, low, high); } template T make_v(T init) { return init; } template auto make_v(T init, std::size_t s, Tail... tail) { auto v = std::move(make_v(init, tail...)); return vec(s, v); } template struct multi_dem_array { using type = std::array::type, Head>; }; template struct multi_dem_array { using type = std::array; }; template using mdarray = typename multi_dem_array::type; namespace init__ { struct InitIO { InitIO() { std::cin.tie(nullptr); std::ios_base::sync_with_stdio(false); std::cout << std::fixed << std::setprecision(30); } } init_io; } const std::size_t SIZE = 64; bool dp[SIZE][SIZE]; ll solve() { dp[0][0] = true; ll x, y, h; std::cin >> x >> y >> h; x *= 1000; y *= 1000; for (ll i = 0; i < 2 * SIZE; i++) { ll ch = h; bool ok = true; for (ll j = 0; j < i; j++) { ch *= 2; if (x <= ch && y <= ch) { ok = false; break; } } if (!ok) break; for (ll j = 0; j <= std::min(i, SIZE - 1); j++) { ll k = i - j; if (!dp[j][k]) continue; ll cntx = (1ll << j), cnty = (1ll << k); if (cntx <= std::numeric_limits::max() / ch && ch * cntx < x) dp[j + 1][k] = true; if (cnty <= std::numeric_limits::max() / ch && ch * cnty < y) dp[j][k + 1] = true; } } ll ans = 0; for (ll i = 0; i < SIZE; i++) for (ll j = 0; j < SIZE; j++) if (dp[i][j]) { chmax(ans, i + j); } return ans; } int main() { std::cout << solve() << '\n'; return 0; }