#include <stdio.h>
int main(void) {
int a[30], n, i;
i=0;
a[0]=2;
a[1]=-1;
for(n=2;n<30;n++){
a[n]=-a[n-1]+a[n-2]+2;
}
while(a[i]<5000){
i++;
}
return 0;
}
I2luY2x1ZGUgPHN0ZGlvLmg+CgppbnQgbWFpbih2b2lkKSB7CglpbnQgYVszMF0sIG4sIGk7CglpPTA7CglhWzBdPTI7CglhWzFdPS0xOwoJZm9yKG49MjtuPDMwO24rKyl7CgkJYVtuXT0tYVtuLTFdK2Fbbi0yXSsyOwoJfQoJCXdoaWxlKGFbaV08NTAwMCl7CgkJCWkrKzsKCQl9CglwcmludGYoIiVk6aCF55uuLCVkIixpLGFbaV0pOwoJcmV0dXJuIDA7Cn0K