a,b=map(int,input().split()) print(sum([1 if (a+b+i)%3==0 else 0 for i in range(a,b+1)]))