import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int n = sc.nextInt(); String temp =""; int count = 0; for (int i = 1; i <= n; i++) { if (i % 3 == 0 && i % 5 ==0) { temp += "FizzBuzz"; } else if (i % 3 == 0) { temp += "Fizz"; }else if (i % 5 == 0) { temp +="Buzz"; } } for (int i = 0; i < temp.length(); i++){ if (temp.substring(i , i+1).equals("z")){ count++; } } System.out.println(count); sc.close(); } }