open System let zCount = function | x when x % 15 = 0 -> 4 | x when x % 3 = 0 -> 2 | x when x % 5 = 0 -> 2 | x -> 0 let count = int(Console.ReadLine()) let n = Seq.initInfinite (fun i->i+1) let z = Seq.map zCount n |> Seq.take count |> Seq.sum printfn "%d" z