package yukicoder; import java.util.ArrayList; import java.util.Scanner; public class Yuki311 { public static void main(String[] args) { Scanner scan = new Scanner(System.in); long num = scan.nextLong(); scan.close(); long ans = 0; for (long i = 1; i <= num; i++) { String strArr = ""; if (i % 3 == 0 && i % 5 == 0) { strArr = "FizzBuzz"; } else if (i % 3 == 0) { strArr = "Fizz"; } else if (i % 5 == 0) { strArr = "Buzz"; } else { } for (long j = 0; j < strArr.length(); j++) { if ('z' == strArr.charAt((int)(j))) { ans++; } } } System.out.println(ans); } }