import java.util.ArrayList; import java.util.Arrays; import java.util.Scanner; public class Main { void run() { Scanner sc = new Scanner(System.in); int A = sc.nextInt(); int B = sc.nextInt(); int ans = 0; for (int i = A; i <= B; ++i) { if ((i + A + B) % 3 == 0) ++ans; } System.out.println(ans); } public static void main(String[] args) { new Main().run(); } void tr(Object... objects) { System.out.println(Arrays.deepToString(objects)); } }