import java.io.*; import java.util.Scanner; public class Main_yukicoder773 { private static Scanner sc; private static Printer pr; private static void solve() { int a = sc.nextInt(); int b = sc.nextInt(); if (b < 23 || a > 25) { pr.println(3); } else { int min = Math.max(23, a); int max = Math.min(25, b); pr.println(3 - (max - min + 1)); } } // --------------------------------------------------- public static void main(String[] args) { sc = new Scanner(System.in); pr = new Printer(System.out); solve(); pr.close(); sc.close(); } static class Printer extends PrintWriter { Printer(OutputStream out) { super(out); } } }