#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+CgppbnQgbWFpbih2b2lkKSB7CglpbnQgYVszMF0sbixpOwoJaT0wOwoJYVswXT0yOwoJYVsxXT0tMTsKCWZvcihuPTI7bjwzMDtuKyspewoJCWFbbl09LWFbbi0xXSthW24tMl0rMjt9Cgl3aGlsZShhW2ldPDUwMDApewoJCWkrKzsKCX0KcHJpbnRmKCIlZOmgheebriAlZCIsaSxhW2ldKTsKCXJldHVybiAwOwp9Cg==