import java.util.*;
 
public class Main {
    public static void main(String[] args) throws Exception {
Scanner sc=new Scanner(System.in);
int a=sc.nextInt();
int b[] =new int[a];
long e=0;
String c[] =new String[a];
for(int i=1;i<a+1;i++){
b[i-1]=i;
}
for(int i=1;i<a+1;i++){
    c[i-1]=String.valueOf(b[i-1]);
            if(b[i-1]%15==0){
        c[i-1]="FizzBuzz";
    }
    if(b[i-1]%3==0){
        c[i-1]="Fizz";
    }
        if(b[i-1]%5==0){
        c[i-1]="Buzz";
    }

}
for(int i=0;i<a;i++){
    if(c[i]=="FizzBuzz"||c[i]=="Fizz"||c[i]=="Buzz"){
    }else{
        e+=Integer.parseInt(c[i]);
    }
    }
    System.out.println(e);
}
} import java.util.*; util.* java public class Main {
    public static void main(String[] args) throws Exception {
Scanner sc=new Scanner(System.in);
int a=sc.nextInt();
int b[] =new int[a];
long e=0;
String c[] =new String[a];
for(int i=1;i<a+1;i++){
b[i-1]=i;
}
for(int i=1;i<a+1;i++){
    c[i-1]=String.valueOf(b[i-1]);
            if(b[i-1]%15==0){
        c[i-1]="FizzBuzz";
    }
    if(b[i-1]%3==0){
        c[i-1]="Fizz";
    }
        if(b[i-1]%5==0){
        c[i-1]="Buzz";
    }

}
for(int i=0;i<a;i++){
    if(c[i]=="FizzBuzz"||c[i]=="Fizz"||c[i]=="Buzz"){
    }else{
        e+=Integer.parseInt(c[i]);
    }
    }
    System.out.println(e);
}
} Main public static void main(String[] args) throws Exception {
Scanner sc=new Scanner(System.in);
int a=sc.nextInt();
int b[] =new int[a];
long e=0;
String c[] =new String[a];
for(int i=1;i<a+1;i++){
b[i-1]=i;
}
for(int i=1;i<a+1;i++){
    c[i-1]=String.valueOf(b[i-1]);
            if(b[i-1]%15==0){
        c[i-1]="FizzBuzz";
    }
    if(b[i-1]%3==0){
        c[i-1]="Fizz";
    }
        if(b[i-1]%5==0){
        c[i-1]="Buzz";
    }

}
for(int i=0;i<a;i++){
    if(c[i]=="FizzBuzz"||c[i]=="Fizz"||c[i]=="Buzz"){
    }else{
        e+=Integer.parseInt(c[i]);
    }
    }
    System.out.println(e);
} main {
Scanner sc=new Scanner(System.in);
int a=sc.nextInt();
int b[] =new int[a];
long e=0;
String c[] =new String[a];
for(int i=1;i<a+1;i++){
b[i-1]=i;
}
for(int i=1;i<a+1;i++){
    c[i-1]=String.valueOf(b[i-1]);
            if(b[i-1]%15==0){
        c[i-1]="FizzBuzz";
    }
    if(b[i-1]%3==0){
        c[i-1]="Fizz";
    }
        if(b[i-1]%5==0){
        c[i-1]="Buzz";
    }

}
for(int i=0;i<a;i++){
    if(c[i]=="FizzBuzz"||c[i]=="Fizz"||c[i]=="Buzz"){
    }else{
        e+=Integer.parseInt(c[i]);
    }
    }
    System.out.println(e);
} Scanner sc=new Scanner(System.in); sc new Scanner(System.in) int a=sc.nextInt(); a sc.nextInt() sc.nextInt sc int b[] =new int[a]; b new int[a] a long e=0; e 0 String c[] =new String[a]; c new String[a] a for(int i=1;i<a+1;i++){
b[i-1]=i;
} int i=1; int i=1; i 1 i<a+1 i a+1 a 1 i++ i++ i {
b[i-1]=i;
} {
b[i-1]=i;
} b[i-1]=i b[i-1] b i-1 i 1 i for(int i=1;i<a+1;i++){
    c[i-1]=String.valueOf(b[i-1]);
            if(b[i-1]%15==0){
        c[i-1]="FizzBuzz";
    }
    if(b[i-1]%3==0){
        c[i-1]="Fizz";
    }
        if(b[i-1]%5==0){
        c[i-1]="Buzz";
    }

} int i=1; int i=1; i 1 i<a+1 i a+1 a 1 i++ i++ i {
    c[i-1]=String.valueOf(b[i-1]);
            if(b[i-1]%15==0){
        c[i-1]="FizzBuzz";
    }
    if(b[i-1]%3==0){
        c[i-1]="Fizz";
    }
        if(b[i-1]%5==0){
        c[i-1]="Buzz";
    }

} {
    c[i-1]=String.valueOf(b[i-1]);
            if(b[i-1]%15==0){
        c[i-1]="FizzBuzz";
    }
    if(b[i-1]%3==0){
        c[i-1]="Fizz";
    }
        if(b[i-1]%5==0){
        c[i-1]="Buzz";
    }

} c[i-1]=String.valueOf(b[i-1]) c[i-1] c i-1 i 1 String.valueOf(b[i-1]) String.valueOf String b[i-1] b i-1 i 1 if(b[i-1]%15==0){
        c[i-1]="FizzBuzz";
    } b[i-1]%15==0 b[i-1]%15 b[i-1] b i-1 i 1 15 0 {
        c[i-1]="FizzBuzz";
    } c[i-1]="FizzBuzz" c[i-1] c i-1 i 1 "FizzBuzz" if(b[i-1]%3==0){
        c[i-1]="Fizz";
    } b[i-1]%3==0 b[i-1]%3 b[i-1] b i-1 i 1 3 0 {
        c[i-1]="Fizz";
    } c[i-1]="Fizz" c[i-1] c i-1 i 1 "Fizz" if(b[i-1]%5==0){
        c[i-1]="Buzz";
    } b[i-1]%5==0 b[i-1]%5 b[i-1] b i-1 i 1 5 0 {
        c[i-1]="Buzz";
    } c[i-1]="Buzz" c[i-1] c i-1 i 1 "Buzz" for(int i=0;i<a;i++){
    if(c[i]=="FizzBuzz"||c[i]=="Fizz"||c[i]=="Buzz"){
    }else{
        e+=Integer.parseInt(c[i]);
    }
    } int i=0; int i=0; i 0 i<a i a i++ i++ i {
    if(c[i]=="FizzBuzz"||c[i]=="Fizz"||c[i]=="Buzz"){
    }else{
        e+=Integer.parseInt(c[i]);
    }
    } {
    if(c[i]=="FizzBuzz"||c[i]=="Fizz"||c[i]=="Buzz"){
    }else{
        e+=Integer.parseInt(c[i]);
    }
    } if(c[i]=="FizzBuzz"||c[i]=="Fizz"||c[i]=="Buzz"){
    }else{
        e+=Integer.parseInt(c[i]);
    } c[i]=="FizzBuzz"||c[i]=="Fizz"||c[i]=="Buzz" c[i]=="FizzBuzz"||c[i]=="Fizz"||c[i]=="Buzz" c[i]=="FizzBuzz" c[i] c i "FizzBuzz" c[i]=="Fizz" c[i] c i "Fizz" c[i]=="Buzz" c[i] c i "Buzz" {
    } {
        e+=Integer.parseInt(c[i]);
    } e+=Integer.parseInt(c[i]) e Integer.parseInt(c[i]) Integer.parseInt Integer c[i] c i System.out.println(e) System.out.println System.out System System.out e String[] args args public class Main {
    public static void main(String[] args) throws Exception {
Scanner sc=new Scanner(System.in);
int a=sc.nextInt();
int b[] =new int[a];
long e=0;
String c[] =new String[a];
for(int i=1;i<a+1;i++){
b[i-1]=i;
}
for(int i=1;i<a+1;i++){
    c[i-1]=String.valueOf(b[i-1]);
            if(b[i-1]%15==0){
        c[i-1]="FizzBuzz";
    }
    if(b[i-1]%3==0){
        c[i-1]="Fizz";
    }
        if(b[i-1]%5==0){
        c[i-1]="Buzz";
    }

}
for(int i=0;i<a;i++){
    if(c[i]=="FizzBuzz"||c[i]=="Fizz"||c[i]=="Buzz"){
    }else{
        e+=Integer.parseInt(c[i]);
    }
    }
    System.out.println(e);
}
} public class Main {
    public static void main(String[] args) throws Exception {
Scanner sc=new Scanner(System.in);
int a=sc.nextInt();
int b[] =new int[a];
long e=0;
String c[] =new String[a];
for(int i=1;i<a+1;i++){
b[i-1]=i;
}
for(int i=1;i<a+1;i++){
    c[i-1]=String.valueOf(b[i-1]);
            if(b[i-1]%15==0){
        c[i-1]="FizzBuzz";
    }
    if(b[i-1]%3==0){
        c[i-1]="Fizz";
    }
        if(b[i-1]%5==0){
        c[i-1]="Buzz";
    }

}
for(int i=0;i<a;i++){
    if(c[i]=="FizzBuzz"||c[i]=="Fizz"||c[i]=="Buzz"){
    }else{
        e+=Integer.parseInt(c[i]);
    }
    }
    System.out.println(e);
}
} Main
import java.util.*;
 
public class Main {
    public static void main(String[] args) throws Exception {
Scanner sc=new Scanner(System.in);
int a=sc.nextInt();
int b[] =new int[a];
long e=0;
String c[] =new String[a];
for(int i=1;i<a+1;i++){
b[i-1]=i;
}
for(int i=1;i<a+1;i++){
    c[i-1]=String.valueOf(b[i-1]);
            if(b[i-1]%15==0){
        c[i-1]="FizzBuzz";
    }
    if(b[i-1]%3==0){
        c[i-1]="Fizz";
    }
        if(b[i-1]%5==0){
        c[i-1]="Buzz";
    }

}
for(int i=0;i<a;i++){
    if(c[i]=="FizzBuzz"||c[i]=="Fizz"||c[i]=="Buzz"){
    }else{
        e+=Integer.parseInt(c[i]);
    }
    }
    System.out.println(e);
}
}