#include<iostream> int main(){ int a,b,i=0; scanf("%d %d",&a,&b); while(a<=b){ if(a%8==0||a%6==0) i=i+1; a=a+1; } printf("%d",i); return 0; }