import java.util.Scanner; public class No_311 { public static void main(String[] args) { Scanner sc = new Scanner(System.in); long endNum = sc.nextLong(); String fb = ""; for(int i = 1;i <= endNum;i++){ if(i%15 == 0){ fb += "Fizzbuzz"; } else if(i%5 == 0){ fb += "Buzz"; } else if(i%3 == 0){ fb += "Fizz"; } else{ fb += String.valueOf(i); } } char[] pieceOf_fb = fb.toCharArray(); long z_count = 0; for(int i = 0;i < pieceOf_fb.length;i++){ char c = pieceOf_fb[i]; if(c == 'z'){ z_count++; } } System.out.println(z_count); sc.close(); } }