import java.util.Scanner; class Test { public static void main(String[] args) { Scanner in = new Scanner(System.in); String str = in.next(); int n = Integer.parseInt(str); int z = 0; for(int i = 1; i <= n; i++) { if(i % 3 == 0) { if(i % 5 == 0) { //FizzBuzz z = z + 4; } else { //Fizz z = z + 2; } } else if(i % 5 == 0) { //Buzz z = z + 2; } else { continue; } } System.out.println(z); } }