using System;
using System.Linq;
using System.Collections.Generic;
class Program
{
///
/// プログラムのエントリポイント
///
///
static void Main(string[] args)
{
long max = long.Parse(Console.ReadLine());
var result = 0;
for (long i = 3; i <= max; i += 3)
result += 2;
for (long i = 5; i <= max; i += 5)
result += 2;
Console.WriteLine(result);
}
}