n=map(int,raw_imput().split()) cnt=0 for i in range(n[0],n[1]+1): m=(n[0]+n[1]+i)%3 if m==0: cnt+=1 print(cnt)