#include int main(void) { unsigned long i; scanf("%ld",&i); unsigned long t=1; char s[100000]; char r[100000]; int y; int w; int g=0; for(t;t<=i;t++){ if(t%15==0){ strcat(s,"FizzBuzz"); }else if(t%3==0){ strcat(s,"Fizz"); }else if(t%5==0){ strcat(s,"Buzz\n"); }else{ sprintf(r,"%d",t); strcat(s,r); } } w=strlen(s); for(y=0;y<=w;y++){ if(s[y]=='z'){ g++; } } printf("%d",g); return 0; }