#include <stdio.h>
int main()
{
int t=0;
float a , b;
float aChanges, bChanges;
scanf("%f %f\n%f %f",&a
,&b
,&aChanges
,&bChanges
); if (b>a && bChanges>aChanges)
{
}
else
{
while(a*aChanges<b*bChanges)
{
a=a*aChanges;
b=b*bChanges;
t=t+1;
}
}
return 0;
}
I2luY2x1ZGUgPHN0ZGlvLmg+CgppbnQgbWFpbigpCnsKICAgIGludCB0PTA7CiAgICBmbG9hdCBhICwgYjsKICAgIGZsb2F0IGFDaGFuZ2VzLCBiQ2hhbmdlczsKICAgIHNjYW5mKCIlZiAlZlxuJWYgJWYiLCZhLCZiLCZhQ2hhbmdlcywmYkNoYW5nZXMpOwogICAgaWYgKGI+YSAmJiBiQ2hhbmdlcz5hQ2hhbmdlcykKICAgIHsKICAgICAgICBwcmludGYoIi0xIik7CiAgICB9CiAgICBlbHNlCiAgICB7CiAgICAgICAgd2hpbGUoYSphQ2hhbmdlczxiKmJDaGFuZ2VzKQogICAgICAgIHsKICAgICAgICAgICAgYT1hKmFDaGFuZ2VzOwogICAgICAgICAgICBiPWIqYkNoYW5nZXM7CiAgICAgICAgdD10KzE7CiAgICAgICAgfQogICAgICAgIHByaW50ZigiJWQiLHQpOwogICAgfQogICAgcmV0dXJuIDA7Cn0K