/* -*- coding: utf-8 -*- * * 1010.cc: No.1010 折って重ねて - yukicoder */ #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include using namespace std; /* constant */ /* typedef */ typedef long long ll; /* global variables */ /* subroutines */ /* main */ int main() { ll x, y, h; scanf("%lld%lld%lld", &x, &y, &h); x *= 1000, y *= 1000; if (x > y) swap(x, y); int c = 0; while (x > h) { x = (x + 1) >> 1; h <<= 1; c++; } while (y > h) { y = (y + 1) >> 1; h <<= 1; c++; } printf("%d\n", c); return 0; }