using System; using System.Collections.Generic; using System.Linq; using static System.Console; class Program { static void Main() { var AB = ReadLine().Split().Select(int.Parse).ToArray(); var a = 0; for (int i = AB[0]; i <= AB[1]; i++) { if ((AB.Sum() + i) % 3 == 0) a++; } WriteLine(a); } }