#include<stdio.h>
int main ()
{
    int n,i;
    long long x=0;
    scanf("%d", &n);
    int arr[n];
    for(i=1; i<=n; i++){
        if(i%3==0 && i%5==0){arr[i]=n+3;}
        else if(i%3==0){arr[i]=n+2;}
        else if(i%5==0){arr[i]=n+1;}
        else {arr[i]=i;
              x=x+i;}
    }
    printf("%lld\n", x);
    for(i=1 ;i<=n; i++){
        if(arr[i]==n+3){printf("FizzBuzz,");}
        else if(arr[i]==n+2){printf("Fizz,");}
        else if(arr[i]==n+1){printf("Buzz,");}
        else {printf("%d,", i);}
    }
}
