import java.util.*; public class Main { public static void main (String[] args) { Scanner sc = new Scanner(System.in); double a = sc.nextInt(); double b = sc.nextInt(); if (b / 200000 >= a / 5000 && b / 200000 <= (a + 1) / 5000) { System.out.println(1); } else { System.out.println(2); } } }