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