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