package com.company; import java.util.Scanner; public class Main { public static void main(String[] args) { // write your code here Scanner s = new Scanner(System.in); long N = s.nextLong(); System.out.println(4*N/15 + 2*(N/3 + N/5 - 2*N/15)); } }