import java.util.Scanner; public class No531 { public static void main(String[] args) { No531 no531 = new No531(); no531.mainStart(); } public void mainStart() { Scanner sc = new Scanner(System.in); String[] nextLines = sc.nextLine().split(" "); int animalNumber = Integer.parseInt(nextLines[0]); int bootRideNumber = Integer.parseInt(nextLines[1]); int ans = logic(animalNumber, bootRideNumber); System.out.println(ans); } public int logic(int animalNumber, int bootRideNumber) { if (animalNumber==bootRideNumber) { return 1; }else if (animalNumber%2==0) { if (animalNumber