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

#define mp make_pair

#define ff first

#define ss second

#define pb push_back

#define w(x) scanf("%d",&x);while(x--)

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

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

#define pi 2*acos(0.0)

using namespace std;

typedef long long ll;

typedef pair<ll,ll> pll;

typedef vector<int> vi;



long long int mod=1e9+9;

const int N=100000;

int t,i,j,cs=0,n,a,b;

string s;



int main()

{

    long long n;

    cin>>n;

    long long ans=n*(n+1)/2 ;

     long long a=n;

     n/=3;

     ans-=3*n*(n+1)/2;

     n=a/5;

     ans-=5*n*(n+1)/2;

     n=a/15;

     ans+=15*n*(n+1)/2;

    cout<<ans<<endl;

}






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



int main() {

	int n;

	scanf("%d", &n);

	

	long long int total = 0;

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

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

			continue;

		}

		else {

			total += i;

		}

	}

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

	return 0;

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

using namespace std;

 

//Made with <3 by MinumCoklatPanas

typedef long long ll;

const int INF = 1e9;

const ll INFF = 1e18;

const int MAXN = 510;

const int MOD = 1e9 + 7;

const double PI = acos(-1.0);

const double INFD = 1E9;

const double EPS = 1e-9;



int main()

{

	ios_base::sync_with_stdio(false);

	cin.tie(0);

	cout.tie(0);

	int n;

	cin >> n;

	ll ans = 0;

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

	{

		if (__gcd(i,15) == 1)

			ans += i;

	}

	cout << ans << endl;

	return 0;

}

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

#include<string.h>



typedef long long ll;



int main(){

	ll n = 0;

	ll x = 0;

	scanf("%lld",&n);

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

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

		}

		else if(i%3==0){

		}

		else if(i%5==0){

		}

		else

			x+=i;

	}

	printf("%lld",x);

}
// Slower C++ solution:
///HELLO THERE~!

///CREATED BY MD SADMAN MEHEDI SIVAN(IUT CSE-SWE^19)



#include <bits/stdc++.h>



#define fastio ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0);

#define read freopen("blue.txt","r",stdin);

#define write freopen("red.txt","w",stdout);

#define pie 2*acos(0.0);



typedef long long ll;



using namespace std;





int main()



{



    fastio;



    long long N;

    cin>>N;



    long long totalsum=0;



    for(long long i=1;i<=N;i++)

    {

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

            continue;



        totalsum=totalsum+i;



    }

    cout<<totalsum;

    return 0;



}


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

#include<string.h>



typedef long long ll;



int main(){

	ll n = 0;

	ll x = 0;

	scanf("%lld",&n);

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

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

		}

		else if(i%3==0){

		}

		else if(i%5==0){

		}

		else

			x+=i;

	}

	printf("%lld",x);

}
// Slower C++ solution:
/*    Mohammed Sami Khan

                       মোহাম্মদ সামী খান

*/

#include<bits/stdc++.h>

using namespace std;

#define pi acos(-1.0)

#define fastio ios_base::sync_with_stdio(false);cin.tie(NULL);cout.tie(NULL)

typedef long long ll;

typedef unsigned long long ull;



int main()

{

    fastio;

    ll t, n, m, i, p, q, r, sum=0, a, b, c, d, f=0;

    char *ye="YES", *no="NO";

    cin>>m;

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

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

        sum+=i;

    }

    cout<<sum<<endl;

}


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

#include<string.h>



typedef long long ll;



int main(){

	ll n = 0;

	ll x = 0;

	scanf("%lld",&n);

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

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

		}

		else if(i%3==0){

		}

		else if(i%5==0){

		}

		else

			x+=i;

	}

	printf("%lld",x);

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

using namespace std;

int main()

{

      ios_base::sync_with_stdio(false);

      long long int n,k,a,b=0,c,m,i,j,p,q;

      cin>>n;

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

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

      }

      cout<<b;

      return 0;

}


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

#include<string.h>



typedef long long ll;



int main(){

	ll n = 0;

	ll x = 0;

	scanf("%lld",&n);

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

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

		}

		else if(i%3==0){

		}

		else if(i%5==0){

		}

		else

			x+=i;

	}

	printf("%lld",x);

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

using namespace std;

typedef long long ll;



signed main()

{

	int n;

	cin>>n;

	ll cnt=0;

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

		if(i%3&&i%5)cnt+=i;

	}

	cout<<cnt<<endl;

	return 0;

}

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

#include<string.h>



typedef long long ll;



int main(){

	ll n = 0;

	ll x = 0;

	scanf("%lld",&n);

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

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

		}

		else if(i%3==0){

		}

		else if(i%5==0){

		}

		else

			x+=i;

	}

	printf("%lld",x);

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

using namespace std;

int main()

{

    long long n,sum=0;

    cin>>n;

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

    {

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

        {

            sum+=i;

        }

    }

    cout<<sum<<endl;

    return 0;

}

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

#include<string.h>



typedef long long ll;



int main(){

	ll n = 0;

	ll x = 0;

	scanf("%lld",&n);

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

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

		}

		else if(i%3==0){

		}

		else if(i%5==0){

		}

		else

			x+=i;

	}

	printf("%lld",x);

}
// Slower C++ solution:


#include <bits/stdc++.h>

#define FRU                                  freopen("out.txt","w",stdout);

#define FRO                                  freopen("in.txt","r",stdin);

#define pb                                   push_back

#define pf                                   push_front

#define ppb                                  pop_back()

#define ppf                                  pop_front()

#define mp                                   make_pair

#define ff                                   first

#define ss                                   second

#define flash                                ios_base::sync_with_stdio(false); cin.tie(NULL);cout.tie(NULL);

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

#define fr(i,j,n)                            for(i=j;i<n;i++)

#define rf(i,j,n)                            for(i=n;i>=j;i--)

#define inf                                  2147483647

#define ll                                   long long

#define ull                                  unsigned long long

#define pii                                  pair<int,int>

#define vi                                   vector<int>

#define vll                                  vector <long long>

#define vch                                  vector <char>

#define itr                                  ::iterator

#define msi                                  map<string,int>

#define psi                                  pair <string,int>

#define vii                                  vector <pair<int,int> >

#define all(n)                               n.begin(),n.end()

#define INF                                  10000000000000000LL

#define pi                                   3.1415926535897932384626434

#define sii                                  set <int>

#define max3(a,b,c)                          max(a,max(b,c))

#define min3(a,b,c)                          min(a,min(b,c))

#define mid3(a,b,c)                          min(max(a,b),max(b,c),max(a,b))

#define max4(a,b,c,d)                        max(max(a,b),max(c,d))

#define min4(a,b,c,d)                        min(min(a,b),min(c,d))

#define endl                                 '\n'

#define endll                                cout<<"\n";

#define spc                                  ' '

#define ld                                   long double



using namespace std;







int main()

{

    flash

    string s,st;

    ll n,t,T,i,j,J,I,k,m;

    char ch;

    cin>>n;

    m=0;

    fr(i,1,n+1)

    {

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

        m+=i;

    }

    cout<<m;

    return 0;

}




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

#include<string.h>



typedef long long ll;



int main(){

	ll n = 0;

	ll x = 0;

	scanf("%lld",&n);

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

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

		}

		else if(i%3==0){

		}

		else if(i%5==0){

		}

		else

			x+=i;

	}

	printf("%lld",x);

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

#include<cmath>

#include<iostream>

#include<algorithm>

#include<cstring>

#include<cstdlib>

#include<queue>

#include<map>

#include<stack>

#include<set>

#include<vector>

#include<functional>

using namespace std;

typedef long long LL;

inline LL read()

{

	LL kk=0,f=1;

	char cc=getchar();

	while(cc<'0'||cc>'9'){if(cc=='-')f=-1;cc=getchar();}

	while(cc>='0'&&cc<='9'){kk=(kk<<1)+(kk<<3)+cc-'0';cc=getchar();}

	return kk*f;

}

bool vis[2000222];int n;

int main()

{

	n=read();

	for(int i=1;i<=n/5+10;++i)vis[i*5]=1;

	for(int i=1;i<=n/3+10;++i)vis[i*3]=1;

	LL asd=0;

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

	{

		if(!vis[i])asd+=i;

	}

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

}

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

#include<string.h>



typedef long long ll;



int main(){

	ll n = 0;

	ll x = 0;

	scanf("%lld",&n);

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

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

		}

		else if(i%3==0){

		}

		else if(i%5==0){

		}

		else

			x+=i;

	}

	printf("%lld",x);

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

using namespace std;

#define elif else if

typedef long long ll;

typedef unsigned long long ull;

#define DEBUG(x) cout<<(x)<<endl



int main()

{

    ll n;

    scanf("%lld", &n);

    ll ans = 0;

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

    {

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

        {

            // puts("FizzBuzz");

            ;

        }

        elif(i%3==0)

        {

            // puts("Fizz");

            ;

        }

        elif(i%5==0)

        {

            // puts("Buzz");

            ;

        }

        else

        {

            ans += i;

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

        }

    }

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

    

    return 0;

}


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

#include<string.h>



typedef long long ll;



int main(){

	ll n = 0;

	ll x = 0;

	scanf("%lld",&n);

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

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

		}

		else if(i%3==0){

		}

		else if(i%5==0){

		}

		else

			x+=i;

	}

	printf("%lld",x);

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

using namespace std;

long long n;

long long ans;

int main(){

	cin>>n;

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

		if (i%3==0){

			continue;

		}

		if (i%5==0){

			continue;

		}

		ans+=i;

	}

	cout<<ans<<endl;

	return 0;

}

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

#include<string.h>



typedef long long ll;



int main(){

	ll n = 0;

	ll x = 0;

	scanf("%lld",&n);

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

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

		}

		else if(i%3==0){

		}

		else if(i%5==0){

		}

		else

			x+=i;

	}

	printf("%lld",x);

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

using namespace std;



int main()

{

     int n,i;

     long long  sum=0;



     cin>>n;



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

     {

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

               sum=sum;

          else if(i%3==0)

               sum==sum;

          else if(i%5==0)

               sum==sum;

               else

                    sum+=i;



     }

     cout<<sum<<endl;

}


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

#include<string.h>



typedef long long ll;



int main(){

	ll n = 0;

	ll x = 0;

	scanf("%lld",&n);

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

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

		}

		else if(i%3==0){

		}

		else if(i%5==0){

		}

		else

			x+=i;

	}

	printf("%lld",x);

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

#define mp make_pair

#define ff first

#define ss second

#define pb push_back

#define w(x) scanf("%d",&x);while(x--)

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

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

#define pi 2*acos(0.0)

using namespace std;

typedef long long ll;

typedef pair<ll,ll> pll;

typedef vector<int> vi;



long long int mod=1e9+9;

const int N=100000;

int t,i,j,cs=0,n,a,b;

string s;



int main()

{

    long long n;

    cin>>n;

    long long ans=n*(n+1)/2 ;

     long long a=n;

     n/=3;

     ans-=3*n*(n+1)/2;

     n=a/5;

     ans-=5*n*(n+1)/2;

     n=a/15;

     ans+=15*n*(n+1)/2;

    cout<<ans<<endl;

}






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

#include<string.h>



typedef long long ll;



int main(){

	ll n = 0;

	ll x = 0;

	scanf("%lld",&n);

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

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

		}

		else if(i%3==0){

		}

		else if(i%5==0){

		}

		else

			x+=i;

	}

	printf("%lld",x);

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

using namespace std;

 

//Made with <3 by MinumCoklatPanas

typedef long long ll;

const int INF = 1e9;

const ll INFF = 1e18;

const int MAXN = 510;

const int MOD = 1e9 + 7;

const double PI = acos(-1.0);

const double INFD = 1E9;

const double EPS = 1e-9;



int main()

{

	ios_base::sync_with_stdio(false);

	cin.tie(0);

	cout.tie(0);

	int n;

	cin >> n;

	ll ans = 0;

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

	{

		if (__gcd(i,15) == 1)

			ans += i;

	}

	cout << ans << endl;

	return 0;

}

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

int main (){

	int a;

	long long int jumlah = 0;

	scanf ("%d", &a);

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

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

			continue;

		}else if (i%3==0){

			continue;

		}else if(i%5==0){

			continue;		

		}else{

			jumlah+=i;

		}

	}

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

	return 0;

}
// Slower C++ solution:
///HELLO THERE~!

///CREATED BY MD SADMAN MEHEDI SIVAN(IUT CSE-SWE^19)



#include <bits/stdc++.h>



#define fastio ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0);

#define read freopen("blue.txt","r",stdin);

#define write freopen("red.txt","w",stdout);

#define pie 2*acos(0.0);



typedef long long ll;



using namespace std;





int main()



{



    fastio;



    long long N;

    cin>>N;



    long long totalsum=0;



    for(long long i=1;i<=N;i++)

    {

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

            continue;



        totalsum=totalsum+i;



    }

    cout<<totalsum;

    return 0;



}


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

int main (){

	int a;

	long long int jumlah = 0;

	scanf ("%d", &a);

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

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

			continue;

		}else if (i%3==0){

			continue;

		}else if(i%5==0){

			continue;		

		}else{

			jumlah+=i;

		}

	}

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

	return 0;

}
// Slower C++ solution:
/*    Mohammed Sami Khan

                       মোহাম্মদ সামী খান

*/

#include<bits/stdc++.h>

using namespace std;

#define pi acos(-1.0)

#define fastio ios_base::sync_with_stdio(false);cin.tie(NULL);cout.tie(NULL)

typedef long long ll;

typedef unsigned long long ull;



int main()

{

    fastio;

    ll t, n, m, i, p, q, r, sum=0, a, b, c, d, f=0;

    char *ye="YES", *no="NO";

    cin>>m;

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

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

        sum+=i;

    }

    cout<<sum<<endl;

}


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

int main (){

	int a;

	long long int jumlah = 0;

	scanf ("%d", &a);

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

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

			continue;

		}else if (i%3==0){

			continue;

		}else if(i%5==0){

			continue;		

		}else{

			jumlah+=i;

		}

	}

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

	return 0;

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

using namespace std;

int main()

{

      ios_base::sync_with_stdio(false);

      long long int n,k,a,b=0,c,m,i,j,p,q;

      cin>>n;

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

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

      }

      cout<<b;

      return 0;

}


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

int main (){

	int a;

	long long int jumlah = 0;

	scanf ("%d", &a);

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

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

			continue;

		}else if (i%3==0){

			continue;

		}else if(i%5==0){

			continue;		

		}else{

			jumlah+=i;

		}

	}

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

	return 0;

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

using namespace std;

typedef long long ll;



signed main()

{

	int n;

	cin>>n;

	ll cnt=0;

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

		if(i%3&&i%5)cnt+=i;

	}

	cout<<cnt<<endl;

	return 0;

}

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

int main (){

	int a;

	long long int jumlah = 0;

	scanf ("%d", &a);

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

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

			continue;

		}else if (i%3==0){

			continue;

		}else if(i%5==0){

			continue;		

		}else{

			jumlah+=i;

		}

	}

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

	return 0;

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

using namespace std;

int main()

{

    long long n,sum=0;

    cin>>n;

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

    {

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

        {

            sum+=i;

        }

    }

    cout<<sum<<endl;

    return 0;

}

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

int main (){

	int a;

	long long int jumlah = 0;

	scanf ("%d", &a);

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

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

			continue;

		}else if (i%3==0){

			continue;

		}else if(i%5==0){

			continue;		

		}else{

			jumlah+=i;

		}

	}

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

	return 0;

}
// Slower C++ solution:


#include <bits/stdc++.h>

#define FRU                                  freopen("out.txt","w",stdout);

#define FRO                                  freopen("in.txt","r",stdin);

#define pb                                   push_back

#define pf                                   push_front

#define ppb                                  pop_back()

#define ppf                                  pop_front()

#define mp                                   make_pair

#define ff                                   first

#define ss                                   second

#define flash                                ios_base::sync_with_stdio(false); cin.tie(NULL);cout.tie(NULL);

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

#define fr(i,j,n)                            for(i=j;i<n;i++)

#define rf(i,j,n)                            for(i=n;i>=j;i--)

#define inf                                  2147483647

#define ll                                   long long

#define ull                                  unsigned long long

#define pii                                  pair<int,int>

#define vi                                   vector<int>

#define vll                                  vector <long long>

#define vch                                  vector <char>

#define itr                                  ::iterator

#define msi                                  map<string,int>

#define psi                                  pair <string,int>

#define vii                                  vector <pair<int,int> >

#define all(n)                               n.begin(),n.end()

#define INF                                  10000000000000000LL

#define pi                                   3.1415926535897932384626434

#define sii                                  set <int>

#define max3(a,b,c)                          max(a,max(b,c))

#define min3(a,b,c)                          min(a,min(b,c))

#define mid3(a,b,c)                          min(max(a,b),max(b,c),max(a,b))

#define max4(a,b,c,d)                        max(max(a,b),max(c,d))

#define min4(a,b,c,d)                        min(min(a,b),min(c,d))

#define endl                                 '\n'

#define endll                                cout<<"\n";

#define spc                                  ' '

#define ld                                   long double



using namespace std;







int main()

{

    flash

    string s,st;

    ll n,t,T,i,j,J,I,k,m;

    char ch;

    cin>>n;

    m=0;

    fr(i,1,n+1)

    {

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

        m+=i;

    }

    cout<<m;

    return 0;

}




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

int main (){

	int a;

	long long int jumlah = 0;

	scanf ("%d", &a);

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

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

			continue;

		}else if (i%3==0){

			continue;

		}else if(i%5==0){

			continue;		

		}else{

			jumlah+=i;

		}

	}

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

	return 0;

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

#include<cmath>

#include<iostream>

#include<algorithm>

#include<cstring>

#include<cstdlib>

#include<queue>

#include<map>

#include<stack>

#include<set>

#include<vector>

#include<functional>

using namespace std;

typedef long long LL;

inline LL read()

{

	LL kk=0,f=1;

	char cc=getchar();

	while(cc<'0'||cc>'9'){if(cc=='-')f=-1;cc=getchar();}

	while(cc>='0'&&cc<='9'){kk=(kk<<1)+(kk<<3)+cc-'0';cc=getchar();}

	return kk*f;

}

bool vis[2000222];int n;

int main()

{

	n=read();

	for(int i=1;i<=n/5+10;++i)vis[i*5]=1;

	for(int i=1;i<=n/3+10;++i)vis[i*3]=1;

	LL asd=0;

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

	{

		if(!vis[i])asd+=i;

	}

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

}

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

int main (){

	int a;

	long long int jumlah = 0;

	scanf ("%d", &a);

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

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

			continue;

		}else if (i%3==0){

			continue;

		}else if(i%5==0){

			continue;		

		}else{

			jumlah+=i;

		}

	}

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

	return 0;

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

using namespace std;

#define elif else if

typedef long long ll;

typedef unsigned long long ull;

#define DEBUG(x) cout<<(x)<<endl



int main()

{

    ll n;

    scanf("%lld", &n);

    ll ans = 0;

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

    {

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

        {

            // puts("FizzBuzz");

            ;

        }

        elif(i%3==0)

        {

            // puts("Fizz");

            ;

        }

        elif(i%5==0)

        {

            // puts("Buzz");

            ;

        }

        else

        {

            ans += i;

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

        }

    }

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

    

    return 0;

}


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

int main (){

	int a;

	long long int jumlah = 0;

	scanf ("%d", &a);

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

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

			continue;

		}else if (i%3==0){

			continue;

		}else if(i%5==0){

			continue;		

		}else{

			jumlah+=i;

		}

	}

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

	return 0;

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

using namespace std;

long long n;

long long ans;

int main(){

	cin>>n;

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

		if (i%3==0){

			continue;

		}

		if (i%5==0){

			continue;

		}

		ans+=i;

	}

	cout<<ans<<endl;

	return 0;

}

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

int main (){

	int a;

	long long int jumlah = 0;

	scanf ("%d", &a);

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

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

			continue;

		}else if (i%3==0){

			continue;

		}else if(i%5==0){

			continue;		

		}else{

			jumlah+=i;

		}

	}

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

	return 0;

}