import java.util.Scanner; public class Main { public static void main(String[] p) { Scanner q = new Scanner(System.in); long n = q.nextLong(); long a = 0L; a += n / 3 + n / 5; System.out.println(a); } }