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