stablegradients/pie-gem5-pairs huggingface dataset:
// Slower C++ solution:
#include<bits/stdc++.h>

using namespace std;

typedef long long ll;

int main()

{

    int n;

    cin>>n;

    ll ans=0;

    for(int i=1;i<=n;i++){

        if(i%3&&i%5){ans+=i;}

    }cout<<ans;

}


// Faster C++ solution for the same problem (measured speedup: 0.717999047149515x):
#include <stdio.h>



int main(){



    long long int brpKali;

    int count=0;

    long long int hasil=0;

    int i=1;

    int j=0;

    long long int arrTampungan[1000000];

    scanf("%lld", &brpKali);

    while(i<=brpKali){

        if(i%3==0 && i%5!=0){

            //printf("Fizz");

        }

        else if(i%5==0 && i%3!=0){

            //printf("Buzz");

        }

        else if(i%3==0 && i%5==0){

            //printf("FizzBuzz");

        }

        else{

           // printf("%d", i);

            arrTampungan[j]=i;

           // printf("\n ini array tampungan ke-%d :%d\n",j , arrTampungan[j]);

            count++;

            j++;

        }

        i++;



    }

 for(int k=0;k<count;k++){

    hasil+=arrTampungan[k];

 }

printf("%lld\n", hasil);

 

 

    return 0;

}
// Slower C++ solution:
#include<bits/stdc++.h>

using namespace std;



int n;

long long sum=0;



int main()

{

	scanf("%d",&n);



	for(int i=1;i<=n;i++)

	{

		if(i%3!=0&&i%5!=0)sum=sum+i;

			

	}

	

	printf("%lld",sum);



	return 0;

}

// Faster C++ solution for the same problem (measured speedup: 0.8348660942917713x):
#include <stdio.h>



int main(){



    long long int brpKali;

    int count=0;

    long long int hasil=0;

    int i=1;

    int j=0;

    long long int arrTampungan[1000000];

    scanf("%lld", &brpKali);

    while(i<=brpKali){

        if(i%3==0 && i%5!=0){

            //printf("Fizz");

        }

        else if(i%5==0 && i%3!=0){

            //printf("Buzz");

        }

        else if(i%3==0 && i%5==0){

            //printf("FizzBuzz");

        }

        else{

           // printf("%d", i);

            arrTampungan[j]=i;

           // printf("\n ini array tampungan ke-%d :%d\n",j , arrTampungan[j]);

            count++;

            j++;

        }

        i++;



    }

 for(int k=0;k<count;k++){

    hasil+=arrTampungan[k];

 }

printf("%lld\n", hasil);

 

 

    return 0;

}
// Slower C++ solution:
#pragma warning(disable:4996)

#include<iostream>

#include<stdio.h>

#include<sstream>

#include<cmath>

#include<stack>

#include<vector>

#include<string>

#include<algorithm>

#include<queue>

#include<map>

#include<set>

#include<limits.h>

using namespace std;

using ll = long long int;

inline ll get(ll i) {

	return (i + 1) * i / 2;

}

int main() {

	ll N;

	cin >> N;

	ll NDT = get(N / 3) * 3, NDF = get(N / 5) * 5, NDFIT = get(N / 15) * 15,

		FN = get(N);

	cout << FN - NDT - NDF + NDFIT;

	return 0;

}

// Faster C++ solution for the same problem (measured speedup: 0.4198561009914779x):
#include <stdio.h>



int main(){



    long long int brpKali;

    int count=0;

    long long int hasil=0;

    int i=1;

    int j=0;

    long long int arrTampungan[1000000];

    scanf("%lld", &brpKali);

    while(i<=brpKali){

        if(i%3==0 && i%5!=0){

            //printf("Fizz");

        }

        else if(i%5==0 && i%3!=0){

            //printf("Buzz");

        }

        else if(i%3==0 && i%5==0){

            //printf("FizzBuzz");

        }

        else{

           // printf("%d", i);

            arrTampungan[j]=i;

           // printf("\n ini array tampungan ke-%d :%d\n",j , arrTampungan[j]);

            count++;

            j++;

        }

        i++;



    }

 for(int k=0;k<count;k++){

    hasil+=arrTampungan[k];

 }

printf("%lld\n", hasil);

 

 

    return 0;

}
// Slower C++ solution:
#include <bits/stdc++.h>

#include <unordered_map> 

#define io ios::sync_with_stdio(false);cin.tie(0); cout.tie(0);

#define int long long

#define sp " "

#define fi freopen("bruh.txt","r",stdin);

#define fo freopen("input.txt", "w", stdout);

#define pb push_back

#define ff first

#define ss second

#define all(x) x.begin(),c.end();

#define allr(x) x.rbegin(), x.rend()

#define pii pair< int , int >

#define rep(i,a,n) for(int i=a;i<n;i++)

#define rev(i,n,a)for(int i=n;i>=a;i--)

#define mem(ara,a) memset(ara,a,sizeof (ara))

long long inf=2e18;

long long minf=-inf;

using namespace std;



signed main(){

int n , m=0;

cin>>n;

for(int i=1;i<=n;i++){

    if(i%3==0 or i%5==0)continue;

    m+=i;

}

cout<<m<<endl;

}




// Faster C++ solution for the same problem (measured speedup: 1.9012827470338687x):
#include <stdio.h>

 

int main(){

    long long int N, sum = 0;

    scanf("%lld", &N);

    for (int i=0 ; i<=N ; i++){

        if (i%3 == 0 || i%5 == 0 ){

            continue;

        }

        else {

            sum+=i;

        }

    }

    printf("%lld", sum);



    return 0;

}
// Slower C++ solution:
#include<iostream>

using namespace std;



int main()

{

    long long int i,n,sum=0;

    cin>>n;

    for(i=1;i<=n;i++)

    {

        if(i%3!=0 && i%5!=0)

            sum=sum+i;

    }

    cout<<sum;

}






// Faster C++ solution for the same problem (measured speedup: 1.8990941788813478x):
#include <stdio.h>

 

int main(){

    long long int N, sum = 0;

    scanf("%lld", &N);

    for (int i=0 ; i<=N ; i++){

        if (i%3 == 0 || i%5 == 0 ){

            continue;

        }

        else {

            sum+=i;

        }

    }

    printf("%lld", sum);



    return 0;

}
// Slower C++ solution:
#include<bits/stdc++.h>

using namespace std;

main()

{

    long long int x,c=0,i;

    cin>>i;

    for(x=1;x<=i;x++){

        if(x%5==0 || x%3==0) continue;



        else c+=x;

    }

    cout<<c;

}


// Faster C++ solution for the same problem (measured speedup: 1.932415489571702x):
#include <stdio.h>

 

int main(){

    long long int N, sum = 0;

    scanf("%lld", &N);

    for (int i=0 ; i<=N ; i++){

        if (i%3 == 0 || i%5 == 0 ){

            continue;

        }

        else {

            sum+=i;

        }

    }

    printf("%lld", sum);



    return 0;

}
// Slower C++ solution:
#include<iostream>



using namespace std;



int main()

{

    int n,i;

    long long int sum=0;

    cin >> n;

    for(i=1; i<=n; i++)

    {

        if(i%3!=0 && i%5!=0)

        {

            sum+=i;

        }



    }

    cout << sum;

    return 0;

}


// Faster C++ solution for the same problem (measured speedup: 1.8993270465680552x):
#include <stdio.h>

 

int main(){

    long long int N, sum = 0;

    scanf("%lld", &N);

    for (int i=0 ; i<=N ; i++){

        if (i%3 == 0 || i%5 == 0 ){

            continue;

        }

        else {

            sum+=i;

        }

    }

    printf("%lld", sum);



    return 0;

}
// Slower C++ solution:
#include<bits/stdc++.h>

using namespace std;

typedef long long ll;

int main()

{

    int n;

    cin>>n;

    ll ans=0;

    for(int i=1;i<=n;i++){

        if(i%3&&i%5){ans+=i;}

    }cout<<ans;

}


// Faster C++ solution for the same problem (measured speedup: 1.8993270465680552x):
#include <stdio.h>

 

int main(){

    long long int N, sum = 0;

    scanf("%lld", &N);

    for (int i=0 ; i<=N ; i++){

        if (i%3 == 0 || i%5 == 0 ){

            continue;

        }

        else {

            sum+=i;

        }

    }

    printf("%lld", sum);



    return 0;

}
// Slower C++ solution:
#include<bits/stdc++.h>

using namespace std;



int n;

long long sum=0;



int main()

{

	scanf("%d",&n);



	for(int i=1;i<=n;i++)

	{

		if(i%3!=0&&i%5!=0)sum=sum+i;

			

	}

	

	printf("%lld",sum);



	return 0;

}

// Faster C++ solution for the same problem (measured speedup: 2.2084761246497826x):
#include <stdio.h>

 

int main(){

    long long int N, sum = 0;

    scanf("%lld", &N);

    for (int i=0 ; i<=N ; i++){

        if (i%3 == 0 || i%5 == 0 ){

            continue;

        }

        else {

            sum+=i;

        }

    }

    printf("%lld", sum);



    return 0;

}
// Slower C++ solution:
#pragma warning(disable:4996)

#include<iostream>

#include<stdio.h>

#include<sstream>

#include<cmath>

#include<stack>

#include<vector>

#include<string>

#include<algorithm>

#include<queue>

#include<map>

#include<set>

#include<limits.h>

using namespace std;

using ll = long long int;

inline ll get(ll i) {

	return (i + 1) * i / 2;

}

int main() {

	ll N;

	cin >> N;

	ll NDT = get(N / 3) * 3, NDF = get(N / 5) * 5, NDFIT = get(N / 15) * 15,

		FN = get(N);

	cout << FN - NDT - NDF + NDFIT;

	return 0;

}

// Faster C++ solution for the same problem (measured speedup: 1.1106477807256259x):
#include <stdio.h>

 

int main(){

    long long int N, sum = 0;

    scanf("%lld", &N);

    for (int i=0 ; i<=N ; i++){

        if (i%3 == 0 || i%5 == 0 ){

            continue;

        }

        else {

            sum+=i;

        }

    }

    printf("%lld", sum);



    return 0;

}
// Slower C++ solution:
#include <stdio.h>



int main(){



    long long int brpKali;

    int count=0;

    long long int hasil=0;

    int i=1;

    int j=0;

    long long int arrTampungan[1000000];

    scanf("%lld", &brpKali);

    while(i<=brpKali){

        if(i%3==0 && i%5!=0){

            //printf("Fizz");

        }

        else if(i%5==0 && i%3!=0){

            //printf("Buzz");

        }

        else if(i%3==0 && i%5==0){

            //printf("FizzBuzz");

        }

        else{

           // printf("%d", i);

            arrTampungan[j]=i;

           // printf("\n ini array tampungan ke-%d :%d\n",j , arrTampungan[j]);

            count++;

            j++;

        }

        i++;



    }

 for(int k=0;k<count;k++){

    hasil+=arrTampungan[k];

 }

printf("%lld\n", hasil);

 

 

    return 0;

}

// Faster C++ solution for the same problem (measured speedup: 2.6453058038286534x):
#include <stdio.h>

 

int main(){

    long long int N, sum = 0;

    scanf("%lld", &N);

    for (int i=0 ; i<=N ; i++){

        if (i%3 == 0 || i%5 == 0 ){

            continue;

        }

        else {

            sum+=i;

        }

    }

    printf("%lld", sum);



    return 0;

}
// Slower C++ solution:
#include <bits/stdc++.h>

#include <unordered_map> 

#define io ios::sync_with_stdio(false);cin.tie(0); cout.tie(0);

#define int long long

#define sp " "

#define fi freopen("bruh.txt","r",stdin);

#define fo freopen("input.txt", "w", stdout);

#define pb push_back

#define ff first

#define ss second

#define all(x) x.begin(),c.end();

#define allr(x) x.rbegin(), x.rend()

#define pii pair< int , int >

#define rep(i,a,n) for(int i=a;i<n;i++)

#define rev(i,n,a)for(int i=n;i>=a;i--)

#define mem(ara,a) memset(ara,a,sizeof (ara))

long long inf=2e18;

long long minf=-inf;

using namespace std;



signed main(){

int n , m=0;

cin>>n;

for(int i=1;i<=n;i++){

    if(i%3==0 or i%5==0)continue;

    m+=i;

}

cout<<m<<endl;

}




// Faster C++ solution for the same problem (measured speedup: 1.1172704579415635x):
#include<stdio.h>



int main(){

	double angka;

	double tempSum=0.0000;

	scanf("%lf", &angka);

	for(long long int i=1;i<=angka;i++){

		double tempI=0;

		if((i%3==0)||(i%5==0)){

			continue;

		}

		else{

			tempI=i/10.000;

			tempSum+=tempI;

		}

		//printf("Hasil angka %lld dengan hasil temp %lf dengan tempI %lf\n", i, tempSum, tempI);

	}

	long long int hasil=tempSum*10;

	printf("%lld\n", hasil);

	return 0;

}
// Slower C++ solution:
#include<iostream>

using namespace std;



int main()

{

    long long int i,n,sum=0;

    cin>>n;

    for(i=1;i<=n;i++)

    {

        if(i%3!=0 && i%5!=0)

            sum=sum+i;

    }

    cout<<sum;

}






// Faster C++ solution for the same problem (measured speedup: 1.115984366987539x):
#include<stdio.h>



int main(){

	double angka;

	double tempSum=0.0000;

	scanf("%lf", &angka);

	for(long long int i=1;i<=angka;i++){

		double tempI=0;

		if((i%3==0)||(i%5==0)){

			continue;

		}

		else{

			tempI=i/10.000;

			tempSum+=tempI;

		}

		//printf("Hasil angka %lld dengan hasil temp %lf dengan tempI %lf\n", i, tempSum, tempI);

	}

	long long int hasil=tempSum*10;

	printf("%lld\n", hasil);

	return 0;

}
// Slower C++ solution:
#include<bits/stdc++.h>

using namespace std;

main()

{

    long long int x,c=0,i;

    cin>>i;

    for(x=1;x<=i;x++){

        if(x%5==0 || x%3==0) continue;



        else c+=x;

    }

    cout<<c;

}


// Faster C++ solution for the same problem (measured speedup: 1.1355653136470008x):
#include<stdio.h>



int main(){

	double angka;

	double tempSum=0.0000;

	scanf("%lf", &angka);

	for(long long int i=1;i<=angka;i++){

		double tempI=0;

		if((i%3==0)||(i%5==0)){

			continue;

		}

		else{

			tempI=i/10.000;

			tempSum+=tempI;

		}

		//printf("Hasil angka %lld dengan hasil temp %lf dengan tempI %lf\n", i, tempSum, tempI);

	}

	long long int hasil=tempSum*10;

	printf("%lld\n", hasil);

	return 0;

}
// Slower C++ solution:
#include<iostream>



using namespace std;



int main()

{

    int n,i;

    long long int sum=0;

    cin >> n;

    for(i=1; i<=n; i++)

    {

        if(i%3!=0 && i%5!=0)

        {

            sum+=i;

        }



    }

    cout << sum;

    return 0;

}


// Faster C++ solution for the same problem (measured speedup: 1.11612120943634x):
#include<stdio.h>



int main(){

	double angka;

	double tempSum=0.0000;

	scanf("%lf", &angka);

	for(long long int i=1;i<=angka;i++){

		double tempI=0;

		if((i%3==0)||(i%5==0)){

			continue;

		}

		else{

			tempI=i/10.000;

			tempSum+=tempI;

		}

		//printf("Hasil angka %lld dengan hasil temp %lf dengan tempI %lf\n", i, tempSum, tempI);

	}

	long long int hasil=tempSum*10;

	printf("%lld\n", hasil);

	return 0;

}
// Slower C++ solution:
#include<bits/stdc++.h>

using namespace std;

typedef long long ll;

int main()

{

    int n;

    cin>>n;

    ll ans=0;

    for(int i=1;i<=n;i++){

        if(i%3&&i%5){ans+=i;}

    }cout<<ans;

}


// Faster C++ solution for the same problem (measured speedup: 1.11612120943634x):
#include<stdio.h>



int main(){

	double angka;

	double tempSum=0.0000;

	scanf("%lf", &angka);

	for(long long int i=1;i<=angka;i++){

		double tempI=0;

		if((i%3==0)||(i%5==0)){

			continue;

		}

		else{

			tempI=i/10.000;

			tempSum+=tempI;

		}

		//printf("Hasil angka %lld dengan hasil temp %lf dengan tempI %lf\n", i, tempSum, tempI);

	}

	long long int hasil=tempSum*10;

	printf("%lld\n", hasil);

	return 0;

}
// Slower C++ solution:
#include<bits/stdc++.h>

using namespace std;



int n;

long long sum=0;



int main()

{

	scanf("%d",&n);



	for(int i=1;i<=n;i++)

	{

		if(i%3!=0&&i%5!=0)sum=sum+i;

			

	}

	

	printf("%lld",sum);



	return 0;

}

// Faster C++ solution for the same problem (measured speedup: 1.297789681724029x):
#include<stdio.h>



int main(){

	double angka;

	double tempSum=0.0000;

	scanf("%lf", &angka);

	for(long long int i=1;i<=angka;i++){

		double tempI=0;

		if((i%3==0)||(i%5==0)){

			continue;

		}

		else{

			tempI=i/10.000;

			tempSum+=tempI;

		}

		//printf("Hasil angka %lld dengan hasil temp %lf dengan tempI %lf\n", i, tempSum, tempI);

	}

	long long int hasil=tempSum*10;

	printf("%lld\n", hasil);

	return 0;

}
// Slower C++ solution:
#pragma warning(disable:4996)

#include<iostream>

#include<stdio.h>

#include<sstream>

#include<cmath>

#include<stack>

#include<vector>

#include<string>

#include<algorithm>

#include<queue>

#include<map>

#include<set>

#include<limits.h>

using namespace std;

using ll = long long int;

inline ll get(ll i) {

	return (i + 1) * i / 2;

}

int main() {

	ll N;

	cin >> N;

	ll NDT = get(N / 3) * 3, NDF = get(N / 5) * 5, NDFIT = get(N / 15) * 15,

		FN = get(N);

	cout << FN - NDT - NDF + NDFIT;

	return 0;

}

// Faster C++ solution for the same problem (measured speedup: 0.6526614500231388x):
#include<stdio.h>



int main(){

	double angka;

	double tempSum=0.0000;

	scanf("%lf", &angka);

	for(long long int i=1;i<=angka;i++){

		double tempI=0;

		if((i%3==0)||(i%5==0)){

			continue;

		}

		else{

			tempI=i/10.000;

			tempSum+=tempI;

		}

		//printf("Hasil angka %lld dengan hasil temp %lf dengan tempI %lf\n", i, tempSum, tempI);

	}

	long long int hasil=tempSum*10;

	printf("%lld\n", hasil);

	return 0;

}
// Slower C++ solution:
#include <stdio.h>



int main(){



    long long int brpKali;

    int count=0;

    long long int hasil=0;

    int i=1;

    int j=0;

    long long int arrTampungan[1000000];

    scanf("%lld", &brpKali);

    while(i<=brpKali){

        if(i%3==0 && i%5!=0){

            //printf("Fizz");

        }

        else if(i%5==0 && i%3!=0){

            //printf("Buzz");

        }

        else if(i%3==0 && i%5==0){

            //printf("FizzBuzz");

        }

        else{

           // printf("%d", i);

            arrTampungan[j]=i;

           // printf("\n ini array tampungan ke-%d :%d\n",j , arrTampungan[j]);

            count++;

            j++;

        }

        i++;



    }

 for(int k=0;k<count;k++){

    hasil+=arrTampungan[k];

 }

printf("%lld\n", hasil);

 

 

    return 0;

}

// Faster C++ solution for the same problem (measured speedup: 1.5544884270632195x):
#include<stdio.h>



int main(){

	double angka;

	double tempSum=0.0000;

	scanf("%lf", &angka);

	for(long long int i=1;i<=angka;i++){

		double tempI=0;

		if((i%3==0)||(i%5==0)){

			continue;

		}

		else{

			tempI=i/10.000;

			tempSum+=tempI;

		}

		//printf("Hasil angka %lld dengan hasil temp %lf dengan tempI %lf\n", i, tempSum, tempI);

	}

	long long int hasil=tempSum*10;

	printf("%lld\n", hasil);

	return 0;

}
// Slower C++ solution:
#include <bits/stdc++.h>

#include <unordered_map> 

#define io ios::sync_with_stdio(false);cin.tie(0); cout.tie(0);

#define int long long

#define sp " "

#define fi freopen("bruh.txt","r",stdin);

#define fo freopen("input.txt", "w", stdout);

#define pb push_back

#define ff first

#define ss second

#define all(x) x.begin(),c.end();

#define allr(x) x.rbegin(), x.rend()

#define pii pair< int , int >

#define rep(i,a,n) for(int i=a;i<n;i++)

#define rev(i,n,a)for(int i=n;i>=a;i--)

#define mem(ara,a) memset(ara,a,sizeof (ara))

long long inf=2e18;

long long minf=-inf;

using namespace std;



signed main(){

int n , m=0;

cin>>n;

for(int i=1;i<=n;i++){

    if(i%3==0 or i%5==0)continue;

    m+=i;

}

cout<<m<<endl;

}




// Faster C++ solution for the same problem (measured speedup: 1.9013320604227508x):
#include <stdio.h>



int main(){

	long long int input, total = 0;

	

	scanf ("%lld", &input);

	

	for (int i = 1; i <= input; i++){

		if(i % 3 != 0 && i % 5 != 0){

        total += i;

    	}

	}

	

	printf ("%lld", total);

	return 0;

}
// Slower C++ solution:
#include<iostream>

using namespace std;



int main()

{

    long long int i,n,sum=0;

    cin>>n;

    for(i=1;i<=n;i++)

    {

        if(i%3!=0 && i%5!=0)

            sum=sum+i;

    }

    cout<<sum;

}






// Faster C++ solution for the same problem (measured speedup: 1.899143435505547x):
#include <stdio.h>



int main(){

	long long int input, total = 0;

	

	scanf ("%lld", &input);

	

	for (int i = 1; i <= input; i++){

		if(i % 3 != 0 && i % 5 != 0){

        total += i;

    	}

	}

	

	printf ("%lld", total);

	return 0;

}
// Slower C++ solution:
#include<bits/stdc++.h>

using namespace std;

main()

{

    long long int x,c=0,i;

    cin>>i;

    for(x=1;x<=i;x++){

        if(x%5==0 || x%3==0) continue;



        else c+=x;

    }

    cout<<c;

}


// Faster C++ solution for the same problem (measured speedup: 1.9324656104475517x):
#include <stdio.h>



int main(){

	long long int input, total = 0;

	

	scanf ("%lld", &input);

	

	for (int i = 1; i <= input; i++){

		if(i % 3 != 0 && i % 5 != 0){

        total += i;

    	}

	}

	

	printf ("%lld", total);

	return 0;

}
// Slower C++ solution:
#include<iostream>



using namespace std;



int main()

{

    int n,i;

    long long int sum=0;

    cin >> n;

    for(i=1; i<=n; i++)

    {

        if(i%3!=0 && i%5!=0)

        {

            sum+=i;

        }



    }

    cout << sum;

    return 0;

}


// Faster C++ solution for the same problem (measured speedup: 1.8993763092321212x):
#include <stdio.h>



int main(){

	long long int input, total = 0;

	

	scanf ("%lld", &input);

	

	for (int i = 1; i <= input; i++){

		if(i % 3 != 0 && i % 5 != 0){

        total += i;

    	}

	}

	

	printf ("%lld", total);

	return 0;

}
// Slower C++ solution:
#include<bits/stdc++.h>

using namespace std;

typedef long long ll;

int main()

{

    int n;

    cin>>n;

    ll ans=0;

    for(int i=1;i<=n;i++){

        if(i%3&&i%5){ans+=i;}

    }cout<<ans;

}


// Faster C++ solution for the same problem (measured speedup: 1.8993763092321212x):
#include <stdio.h>



int main(){

	long long int input, total = 0;

	

	scanf ("%lld", &input);

	

	for (int i = 1; i <= input; i++){

		if(i % 3 != 0 && i % 5 != 0){

        total += i;

    	}

	}

	

	printf ("%lld", total);

	return 0;

}
// Slower C++ solution:
#include<bits/stdc++.h>

using namespace std;



int n;

long long sum=0;



int main()

{

	scanf("%d",&n);



	for(int i=1;i<=n;i++)

	{

		if(i%3!=0&&i%5!=0)sum=sum+i;

			

	}

	

	printf("%lld",sum);



	return 0;

}

// Faster C++ solution for the same problem (measured speedup: 2.208533405683938x):
#include <stdio.h>



int main(){

	long long int input, total = 0;

	

	scanf ("%lld", &input);

	

	for (int i = 1; i <= input; i++){

		if(i % 3 != 0 && i % 5 != 0){

        total += i;

    	}

	}

	

	printf ("%lld", total);

	return 0;

}
// Slower C++ solution:
#pragma warning(disable:4996)

#include<iostream>

#include<stdio.h>

#include<sstream>

#include<cmath>

#include<stack>

#include<vector>

#include<string>

#include<algorithm>

#include<queue>

#include<map>

#include<set>

#include<limits.h>

using namespace std;

using ll = long long int;

inline ll get(ll i) {

	return (i + 1) * i / 2;

}

int main() {

	ll N;

	cin >> N;

	ll NDT = get(N / 3) * 3, NDF = get(N / 5) * 5, NDFIT = get(N / 15) * 15,

		FN = get(N);

	cout << FN - NDT - NDF + NDFIT;

	return 0;

}

// Faster C++ solution for the same problem (measured speedup: 1.110676587490957x):
#include <stdio.h>



int main(){

	long long int input, total = 0;

	

	scanf ("%lld", &input);

	

	for (int i = 1; i <= input; i++){

		if(i % 3 != 0 && i % 5 != 0){

        total += i;

    	}

	}

	

	printf ("%lld", total);

	return 0;

}
// Slower C++ solution:
#include <stdio.h>



int main(){



    long long int brpKali;

    int count=0;

    long long int hasil=0;

    int i=1;

    int j=0;

    long long int arrTampungan[1000000];

    scanf("%lld", &brpKali);

    while(i<=brpKali){

        if(i%3==0 && i%5!=0){

            //printf("Fizz");

        }

        else if(i%5==0 && i%3!=0){

            //printf("Buzz");

        }

        else if(i%3==0 && i%5==0){

            //printf("FizzBuzz");

        }

        else{

           // printf("%d", i);

            arrTampungan[j]=i;

           // printf("\n ini array tampungan ke-%d :%d\n",j , arrTampungan[j]);

            count++;

            j++;

        }

        i++;



    }

 for(int k=0;k<count;k++){

    hasil+=arrTampungan[k];

 }

printf("%lld\n", hasil);

 

 

    return 0;

}

// Faster C++ solution for the same problem (measured speedup: 2.645374414872445x):
#include <stdio.h>



int main(){

	long long int input, total = 0;

	

	scanf ("%lld", &input);

	

	for (int i = 1; i <= input; i++){

		if(i % 3 != 0 && i % 5 != 0){

        total += i;

    	}

	}

	

	printf ("%lld", total);

	return 0;

}