stablegradients/pie-gem5-pairs huggingface dataset:
// 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.8985001251084925x):
#include <stdio.h>

#include <string.h>



int main(){

	long long int N, sum = 0;

	scanf ("%lld", &N);

	

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

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

			sum+=i;

		}

	}

	

	printf ("%lld\n", 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.9318110125925874x):
#include <stdio.h>

#include <string.h>



int main(){

	long long int N, sum = 0;

	scanf ("%lld", &N);

	

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

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

			sum+=i;

		}

	}

	

	printf ("%lld\n", 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.8987329199520888x):
#include <stdio.h>

#include <string.h>



int main(){

	long long int N, sum = 0;

	scanf ("%lld", &N);

	

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

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

			sum+=i;

		}

	}

	

	printf ("%lld\n", 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.8987329199520888x):
#include <stdio.h>

#include <string.h>



int main(){

	long long int N, sum = 0;

	scanf ("%lld", &N);

	

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

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

			sum+=i;

		}

	}

	

	printf ("%lld\n", 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.207785293416293x):
#include <stdio.h>

#include <string.h>



int main(){

	long long int N, sum = 0;

	scanf ("%lld", &N);

	

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

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

			sum+=i;

		}

	}

	

	printf ("%lld\n", 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.1103003600912043x):
#include <stdio.h>

#include <string.h>



int main(){

	long long int N, sum = 0;

	scanf ("%lld", &N);

	

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

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

			sum+=i;

		}

	}

	

	printf ("%lld\n", 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.9010293985537223x):
#include <stdio.h>



int main (){

	

	int N;

	long long int count=0;

	scanf("%d", &N);

	

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

		count; 

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

		}

	 else {

			count=count+i ;

		

		}

}

	printf("%lld", count);

	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.8988411220308479x):
#include <stdio.h>



int main (){

	

	int N;

	long long int count=0;

	scanf("%d", &N);

	

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

		count; 

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

		}

	 else {

			count=count+i ;

		

		}

}

	printf("%lld", count);

	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.9321579926117902x):
#include <stdio.h>



int main (){

	

	int N;

	long long int count=0;

	scanf("%d", &N);

	

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

		count; 

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

		}

	 else {

			count=count+i ;

		

		}

}

	printf("%lld", count);

	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.899073958687623x):
#include <stdio.h>



int main (){

	

	int N;

	long long int count=0;

	scanf("%d", &N);

	

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

		count; 

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

		}

	 else {

			count=count+i ;

		

		}

}

	printf("%lld", count);

	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.899073958687623x):
#include <stdio.h>



int main (){

	

	int N;

	long long int count=0;

	scanf("%d", &N);

	

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

		count; 

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

		}

	 else {

			count=count+i ;

		

		}

}

	printf("%lld", count);

	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.2081818422393984x):
#include <stdio.h>



int main (){

	

	int N;

	long long int count=0;

	scanf("%d", &N);

	

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

		count; 

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

		}

	 else {

			count=count+i ;

		

		}

}

	printf("%lld", count);

	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.1104997854168464x):
#include <stdio.h>



int main (){

	

	int N;

	long long int count=0;

	scanf("%d", &N);

	

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

		count; 

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

		}

	 else {

			count=count+i ;

		

		}

}

	printf("%lld", count);

	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.9006880086571727x):
#include<stdio.h>

int main(){

    long long int input;

    long long int sum = 0;

    scanf("%lld", &input);

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

        if(i % 3 != 0 && i % 5 != 0)//jika kedua nya tidak habis dibagi 5 dan 3

        {

            sum = sum + i;//sum dijumlah

        }

    }

    printf("%lld\n", 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.8985001251084925x):
#include<stdio.h>

int main(){

    long long int input;

    long long int sum = 0;

    scanf("%lld", &input);

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

        if(i % 3 != 0 && i % 5 != 0)//jika kedua nya tidak habis dibagi 5 dan 3

        {

            sum = sum + i;//sum dijumlah

        }

    }

    printf("%lld\n", 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.9318110125925874x):
#include<stdio.h>

int main(){

    long long int input;

    long long int sum = 0;

    scanf("%lld", &input);

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

        if(i % 3 != 0 && i % 5 != 0)//jika kedua nya tidak habis dibagi 5 dan 3

        {

            sum = sum + i;//sum dijumlah

        }

    }

    printf("%lld\n", 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.8987329199520888x):
#include<stdio.h>

int main(){

    long long int input;

    long long int sum = 0;

    scanf("%lld", &input);

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

        if(i % 3 != 0 && i % 5 != 0)//jika kedua nya tidak habis dibagi 5 dan 3

        {

            sum = sum + i;//sum dijumlah

        }

    }

    printf("%lld\n", 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.8987329199520888x):
#include<stdio.h>

int main(){

    long long int input;

    long long int sum = 0;

    scanf("%lld", &input);

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

        if(i % 3 != 0 && i % 5 != 0)//jika kedua nya tidak habis dibagi 5 dan 3

        {

            sum = sum + i;//sum dijumlah

        }

    }

    printf("%lld\n", 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.207785293416293x):
#include<stdio.h>

int main(){

    long long int input;

    long long int sum = 0;

    scanf("%lld", &input);

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

        if(i % 3 != 0 && i % 5 != 0)//jika kedua nya tidak habis dibagi 5 dan 3

        {

            sum = sum + i;//sum dijumlah

        }

    }

    printf("%lld\n", 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.1103003600912043x):
#include<stdio.h>

int main(){

    long long int input;

    long long int sum = 0;

    scanf("%lld", &input);

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

        if(i % 3 != 0 && i % 5 != 0)//jika kedua nya tidak habis dibagi 5 dan 3

        {

            sum = sum + i;//sum dijumlah

        }

    }

    printf("%lld\n", 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.9006880086571727x):
#include <stdio.h>

#include<string.h>



int main() {

	

	long long int N;

	long long int sum = 0;

	

	scanf("%lld", &N);

	

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

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

			sum += i;

		}

	}

	

	printf("%lld\n", 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.8985001251084925x):
#include <stdio.h>

#include<string.h>



int main() {

	

	long long int N;

	long long int sum = 0;

	

	scanf("%lld", &N);

	

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

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

			sum += i;

		}

	}

	

	printf("%lld\n", 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.9318110125925874x):
#include <stdio.h>

#include<string.h>



int main() {

	

	long long int N;

	long long int sum = 0;

	

	scanf("%lld", &N);

	

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

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

			sum += i;

		}

	}

	

	printf("%lld\n", 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.8987329199520888x):
#include <stdio.h>

#include<string.h>



int main() {

	

	long long int N;

	long long int sum = 0;

	

	scanf("%lld", &N);

	

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

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

			sum += i;

		}

	}

	

	printf("%lld\n", 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.8987329199520888x):
#include <stdio.h>

#include<string.h>



int main() {

	

	long long int N;

	long long int sum = 0;

	

	scanf("%lld", &N);

	

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

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

			sum += i;

		}

	}

	

	printf("%lld\n", 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.207785293416293x):
#include <stdio.h>

#include<string.h>



int main() {

	

	long long int N;

	long long int sum = 0;

	

	scanf("%lld", &N);

	

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

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

			sum += i;

		}

	}

	

	printf("%lld\n", 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.1103003600912043x):
#include <stdio.h>

#include<string.h>



int main() {

	

	long long int N;

	long long int sum = 0;

	

	scanf("%lld", &N);

	

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

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

			sum += i;

		}

	}

	

	printf("%lld\n", 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: 0.7187383569347893x):
#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<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: 0.7179110166139262x):
#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;

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: 0.7305074093039988x):
#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<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: 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;

}