Scanf.scanf "%d" (fun m -> let rec loop i acc = if i = 128 then acc else loop (i + 1) ((acc * 2) mod m) in loop 0 1 |> Printf.printf "%d\n" )