import java.util.*; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int a = Integer.parseInt(sc.next()); int b = Integer.parseInt(sc.next()) / 40; int ans = (a == b)? 1 : 2; System.out.println(ans); } }