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