package algo; import java.util.*; public class sample1 { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int A = sc.nextInt(); int B = sc.nextInt(); List list = new ArrayList<>(); list.add(23); list.add(24); list.add(25); int cnt = 3; for(int l : list) { for(int i = A; i <= B; i++) { if(i == l) { cnt--; } } } System.out.println(cnt); } }