#include <stdio.h>
int main(void)
{
int a,r;
a=2;
for(r=1;a<=1000;r++){
a=3*a-2;
if(a>=100&&a<=1000)
}
return 0;
}
I2luY2x1ZGUgPHN0ZGlvLmg+CgppbnQgbWFpbih2b2lkKSAKewoJaW50IGEscjsKCWE9MjsKCWZvcihyPTE7YTw9MTAwMDtyKyspewoJICAgIGE9MyphLTI7CgkJaWYoYT49MTAwJiZhPD0xMDAwKQoJCXByaW50ZigiJWQgIixhKTsKCQkKCX0KCXJldHVybiAwOwp9Cg==