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