let a = stdin.ReadLine () |> int64 let b = stdin.ReadLine () |> int64 if b - 40L <= 40L * a && 40L * a <= b + 1L then 1 else 2 |> printfn "%d"