stablegradients/pie-gem5-pairs huggingface dataset:
// Slower C++ solution:
#include <iostream>

#include <algorithm>

#include <stdio.h>

#include <string.h>

#include <string>

#include <queue>

#include <math.h>

#define ll long long

using namespace std;

//int main()

//{

//    int a[1005];

//    int n;

//    scanf("%d",&n);

//    for(int i=0;i<n;i++)

//        scanf("%d",&a[i]);

//    sort(a,a+n);

//    int l=0,r=n-1;

//    int flag=0;

//    while(l<r)

//    {

//        //printf("***");

//        int mx=0,mn=0;

//        int m=a[l]+a[r];

//        for(int i=0;i<n;i++)

//        {

//            if(i==r||i==l)

//                continue;

//           // printf("***");

//            if(a[i]+m==0)

//            {

//                flag=1;

//                printf("%d %d %d\n",a[l],a[i],a[r]);

//            }

//            mx=abs(a[i]+m);

//            if(a[i]+m>0)

//                mn=1;

//            else if(a[i]+m<0)

//                mn=-1;

//        }

//        if(mn==-1)

//            l++;

//        if(mn==1)

//            r--;

//    }

//    if(flag==0)

//    {

//        printf("No Solution\n");

//    }

//    return 0;

//}





int main()

{

   int n;

   ll sum=0,sum1=0;

   scanf("%d",&n);

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

   {

       sum+=i;

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

        sum1+=i;



   }

   printf("%lld\n",sum-sum1);

   return 0;

}


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

#include<string.h>

#include<algorithm>

using namespace std;

int main()

{

	double n,sum=0,flag=0;

	scanf("%lf",&n);

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

	{

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

		  flag=1;

		else

		  sum+=i;

	}

	printf("%.0lf\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.9001011467123348x):
#include<stdio.h>



int main(){

	long long int input, sum=0;

	scanf("%lld", &input);

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

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

		} 

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

		//} 

		else{

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



int main(){

	long long int input, sum=0;

	scanf("%lld", &input);

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

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

		} 

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

		//} 

		else{

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



int main(){

	long long int input, sum=0;

	scanf("%lld", &input);

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

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

		} 

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

		//} 

		else{

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



int main(){

	long long int input, sum=0;

	scanf("%lld", &input);

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

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

		} 

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

		//} 

		else{

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



int main(){

	long long int input, sum=0;

	scanf("%lld", &input);

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

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

		} 

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

		//} 

		else{

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



int main(){

	long long int input, sum=0;

	scanf("%lld", &input);

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

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

		} 

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

		//} 

		else{

			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;

	scanf("%d",&N);

	long long int sum =0;

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

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

			sum +=0;

		}

		else if(i%3==0){

			sum += 0;

		}

		else if(i%5==0){

			sum+=0;

		}

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



int main(){

	int N;

	scanf("%d",&N);

	long long int sum =0;

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

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

			sum +=0;

		}

		else if(i%3==0){

			sum += 0;

		}

		else if(i%5==0){

			sum+=0;

		}

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



int main(){

	int N;

	scanf("%d",&N);

	long long int sum =0;

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

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

			sum +=0;

		}

		else if(i%3==0){

			sum += 0;

		}

		else if(i%5==0){

			sum+=0;

		}

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



int main(){

	int N;

	scanf("%d",&N);

	long long int sum =0;

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

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

			sum +=0;

		}

		else if(i%3==0){

			sum += 0;

		}

		else if(i%5==0){

			sum+=0;

		}

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



int main(){

	int N;

	scanf("%d",&N);

	long long int sum =0;

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

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

			sum +=0;

		}

		else if(i%3==0){

			sum += 0;

		}

		else if(i%5==0){

			sum+=0;

		}

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



int main(){

	int N;

	scanf("%d",&N);

	long long int sum =0;

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

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

			sum +=0;

		}

		else if(i%3==0){

			sum += 0;

		}

		else if(i%5==0){

			sum+=0;

		}

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

int main(){

	

	int n;

	scanf("%d", &n);

	long long sum=0;

	

	for (int i=1; 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.8982155940788017x):
#include <stdio.h>

int main(){

	

	int n;

	scanf("%d", &n);

	long long sum=0;

	

	for (int i=1; 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.9315214892107813x):
#include <stdio.h>

int main(){

	

	int n;

	scanf("%d", &n);

	long long sum=0;

	

	for (int i=1; 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.8984483540330894x):
#include <stdio.h>

int main(){

	

	int n;

	scanf("%d", &n);

	long long sum=0;

	

	for (int i=1; 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.8984483540330894x):
#include <stdio.h>

int main(){

	

	int n;

	scanf("%d", &n);

	long long sum=0;

	

	for (int i=1; 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.2074544093596824x):
#include <stdio.h>

int main(){

	

	int n;

	scanf("%d", &n);

	long long sum=0;

	

	for (int i=1; 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.9010293985537223x):
#include <stdio.h>



int main(){

	int N;

	scanf("%d",&N);

	long long hasil=0;

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

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

			continue;

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

			continue;

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

			continue;

		}else {

			hasil += i;

		}

	}

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



int main(){

	int N;

	scanf("%d",&N);

	long long hasil=0;

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

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

			continue;

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

			continue;

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

			continue;

		}else {

			hasil += i;

		}

	}

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



int main(){

	int N;

	scanf("%d",&N);

	long long hasil=0;

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

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

			continue;

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

			continue;

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

			continue;

		}else {

			hasil += i;

		}

	}

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



int main(){

	int N;

	scanf("%d",&N);

	long long hasil=0;

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

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

			continue;

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

			continue;

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

			continue;

		}else {

			hasil += i;

		}

	}

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



int main(){

	int N;

	scanf("%d",&N);

	long long hasil=0;

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

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

			continue;

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

			continue;

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

			continue;

		}else {

			hasil += i;

		}

	}

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



int main(){

	int N;

	scanf("%d",&N);

	long long hasil=0;

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

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

			continue;

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

			continue;

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

			continue;

		}else {

			hasil += i;

		}

	}

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



int main() {

	 long long int n, notfb, sum = 0, i;

	 scanf("%lld", &n);

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

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

	 			continue;

			 }

			 else {

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



int main() {

	 long long int n, notfb, sum = 0, i;

	 scanf("%lld", &n);

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

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

	 			continue;

			 }

			 else {

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



int main() {

	 long long int n, notfb, sum = 0, i;

	 scanf("%lld", &n);

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

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

	 			continue;

			 }

			 else {

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



int main() {

	 long long int n, notfb, sum = 0, i;

	 scanf("%lld", &n);

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

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

	 			continue;

			 }

			 else {

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



int main() {

	 long long int n, notfb, sum = 0, i;

	 scanf("%lld", &n);

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

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

	 			continue;

			 }

			 else {

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



int main() {

	 long long int n, notfb, sum = 0, i;

	 scanf("%lld", &n);

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

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

	 			continue;

			 }

			 else {

			 	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 angka;

	scanf("%d", &angka);

	

	long long int sum =0;

	

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

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

			continue;

		}

		else if (i % 3 ==0){

			continue;

		}

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



int main (){

	int angka;

	scanf("%d", &angka);

	

	long long int sum =0;

	

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

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

			continue;

		}

		else if (i % 3 ==0){

			continue;

		}

		else if (i % 5 == 0){

			continue;

		}

		else {

			sum += i;

		}

	}

	

	printf("%lld", sum);

	return 0;

}