import java.io.*; public class FizzBuzz { public static void main(String[] args) throws Exception{ BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); long n = Long.parseLong(br.readLine()); long fizz,buzz; fizz=n/3; buzz=n/5; System.out.println(2*(fizz+buzz)); } }