let isPrime n = let limit = n |> float |> sqrt |> ceil |> int let rec check i = if i > limit then true elif n % i = 0 then false else check (i+1) if n > 2 then check 2 else 2 = n let n = stdin.ReadLine().Trim() |> int seq { for i in 2 .. n do i } |> Seq.filter isPrime |> Seq.sum |> printfn "%d"