Scanf.scanf "%d %d" (fun n l -> let z = 998244353 in let ( *@) a b = (a * b) mod z in let modpow a b = let rec loop r i acc = if i = 0 then acc else loop (r *@ r) (i lsr 1) (if i land 1 = 0 then acc else acc *@ r) in loop a b 1 in let a = (n + l - 1) / l in Printf.printf "%d\n" @@ (modpow 2 a + z - 1) mod z )