using System; using System.Collections.Generic; using System.Linq; class Program { public void Solve() { long N = long.Parse(Console.ReadLine()); long fb = N / 15; long f = N / 3 - fb; long b = N / 5 - fb; Console.WriteLine((fb * 4) + ((f + b) * 2)); } static void Main() { var solver = new Program(); solver.Solve(); } }