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