open System [] let main args = let s = Console.ReadLine().Split(' '); let N = Int64.Parse(s.[0]) let z = 2L * (N / 5L + N / 3L - N / 15L) + N / 15L * 2L printfn "%d" z 0