using System; using System.Linq; using System.Collections.Generic; class Program { static void Main(string[] args) { long n = long.Parse(Console.ReadLine()); int count = 0; for (int i = 1; i <= n; i++) { if (i % 3 == 0) { count += 2; } if (i % 5 == 0) { count += 2; } } Console.WriteLine(count); } }