import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner scan = new Scanner(System.in); int max = scan.nextInt(); String fizzBuzzStr = ""; for(int i = 1; i <= max; i++){ if(i % 3 == 0 && i % 5 == 0){ fizzBuzzStr += "FizzBuzz"; }else if(i % 3 == 0){ fizzBuzzStr += "Fizz"; }else if(i % 5 == 0){ fizzBuzzStr += "Buzz"; }else{ fizzBuzzStr += i; } } char[] fizzBuzzStr_Char = fizzBuzzStr.toCharArray(); int zCount = 0; for(int i = 0; i < fizzBuzzStr.length(); i++){ if(fizzBuzzStr_Char[i] == 'z') zCount++; } System.out.println(zCount); scan.close(); } }