a, b = list(map(int, input().split(' '))) n = 0 for i in range(a, b+1): if (a+i+b)%3 == 0: n+=1 print(n)