import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; public class Main{ public static void main(String[] args) { try (BufferedReader br = new BufferedReader(new InputStreamReader(System.in))) { long n = Long.parseLong(br.readLine()); char[] arr = FizzBuzz(n).toCharArray(); long cnt = 0; for (char c : arr) { if (c == 'z') { cnt++; } } System.out.println(cnt); } catch (IOException e) { e.printStackTrace(); } } public static String FizzBuzz(long n) { StringBuilder sb = new StringBuilder(); for (long i = 1; i < n + 1; i++) { if (i % 15 == 0) { sb.append("FizzBuzz"); } else if (i % 3 == 0) { sb.append("Fizz"); } else if (i % 5 == 0) { sb.append("Buzz"); } else { sb.append(i); } } return sb.toString(); } }