main(a,b,c,i){c = 0;scanf("%d%d",&a,&b);for(i=a;i<=b;i++)if(!((a+b+i)%3))c++;printf("%d\n",c);}