import java.util.Scanner; public class No773 { public static void main(String args[]) { Scanner sc = new Scanner(System.in); int saisyo = sc.nextInt(); int saigo = sc.nextInt(); int ikeru = 3; for( int i = saisyo; i <= saigo; i++ ) { if( i == 23 || i == 24 || i == 25 ){ ikeru -= 1; } } System.out.println( ikeru ); } }