#include <stdio.h>

int main(void) {
	long long V,d;
	long long prev1,prev2,current;
	long long i;
	long long count;
	while(scanf("%lld%lld",&V,&d)==2) {
		prev1=1;
		prev2=2;
		count=1;
		for(i=2;i<=V;i++) {
			current=prev1+prev2;
			prev1=prev2;
			prev2=current;
			if(prev2-prev1>=d)count++;
		}
		printf("%lld\n",count);
	}
	return 0;
}