let m = stdin.ReadLine() |> uint64 let mutable ans = 1UL Array.init 128 (fun _ -> ans <- (ans * 2UL) % m ) ans |> printfn "%d"