import java.util.*; public class Main { public static void main(String[] args) throws Exception { Scanner in = new Scanner(System.in); // 合宿の日程 List camp = Arrays.asList(23, 24, 25); final int camp_length = 3; int start = in.nextInt(); int end = in.nextInt(); List trip = new ArrayList<>(); // 旅行の日程 for(int i=start; i<=end; i++){ trip.add(i); } // 日程重複の確認 int count = 0; int N = (camp_length > trip.size()) ? trip.size() : camp_length; for(int a : trip){ if(camp.contains(a)){ count++; } } System.out.println(camp_length - count); } }