#include <stdio.h>
void func(int m,int n){
int c=0;
while(n>=2*m){
if(n%2)
--n;
else
n/=2;
++c;
}
}
int main(void) {
func(3,10);
func(3,95);
func(666,2014);
return 0;
}
I2luY2x1ZGUgPHN0ZGlvLmg+CnZvaWQgZnVuYyhpbnQgbSxpbnQgbil7CglpbnQgYz0wOwoJd2hpbGUobj49MiptKXsKCQlpZihuJTIpCgkJCS0tbjsKCQllbHNlCgkJCW4vPTI7CgkJKytjOwoJfQoJcHJpbnRmKCIlZFxuIixjK24tbSk7Cn0KaW50IG1haW4odm9pZCkgewoJZnVuYygzLDEwKTsKICAgIGZ1bmMoMyw5NSk7CglmdW5jKDY2NiwyMDE0KTsKCXJldHVybiAwOwp9Cg==