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

#include<cstdio>

#include<iomanip>

#include<algorithm>

#include<cstring>

#include<cmath>

#include<vector>

#include<map>

using namespace std;

string s[10005];

int main() 

{

	int n;

    cin>>n;

    long long ans=0;

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

    {

        if (i%3==0)

        continue;

        else if (i%5==0)

        continue;

        else

        ans+=i;

    }

    cout<<ans<<endl;

    return 0;

}




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

int main(){

	long long int n,sum=0;

	scanf("%ld",&n);

		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;

		sum += i;

		}

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

 	return 0;

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



#define forn(i, n) for (int i = 0; i < int(n); ++i)

#define for1(i, n) for (int i = 1; i <= int(n); ++i)

#define ms(a, x) memset(a, x, sizeof(a))

#define F first

#define S second

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



using namespace std;

typedef long long ll;

typedef pair<int, int> pii;

const int INF = 0x3f3f3f3f;

mt19937 gen(random_device{}());

template<typename... Args> void write(Args... args) { ((cout << args << " "), ...); cout<<endl;}



int main() {

    ios::sync_with_stdio(false);

    cin.tie(nullptr);

    int n;

    cin>>n;

    ll sum=0;

    for1(i,n){

        if(i%3 and i%5) sum+=i;

    }

    cout<<sum;

    return 0;

}




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

int main(){

	long long int n,sum=0;

	scanf("%ld",&n);

		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;

		sum += i;

		}

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

 	return 0;

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

using namespace std;



int main()

{

    long long n;

    cin>>n;

    long long count=0;

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

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

            {//cout<<"FizzBuzz\n";

            count+=i;}

        else if(i%3 == 0)

            {//cout<<"Fizz\n";

            count+=i;}

        else if(i%5 == 0)

            {//cout<<"Buzz\n";

            count+=i;}

     }

     cout<<(n*(n+1))/2-count<<endl;

    return 0;

}  

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

int main(){

	long long int n,sum=0;

	scanf("%ld",&n);

		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;

		sum += i;

		}

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

 	return 0;

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

using namespace std;

typedef long long ll;

inline ll calc(ll x) {

	return (x+1)*x/2; 

}

int main() {

	ll n,ans;

	cin>>n;

	ans=calc(n)-calc(n/3)*3-calc(n/5)*5+calc(n/15)*15;

	cout<<ans<<endl;

	return 0;

} 

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

int main(){

	long long int n,sum=0;

	scanf("%ld",&n);

		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;

		sum += i;

		}

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

 	return 0;

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

using namespace std;

#define ll long long



int main()

{

    ios_base::sync_with_stdio(false);

	cin.tie(NULL);

	cout.tie(NULL);

    ll n;

    cin >> n;

    ll sum = 0;

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

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

        else {sum += i;}

    }

    cout << sum << endl;

    return 0;

}


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

int main(){

	long long int n,sum=0;

	scanf("%ld",&n);

		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;

		sum += i;

		}

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

 	return 0;

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

    using namespace std;

    #define 	ll 			long long

    #define 	w(t)		int t; cin>>t; while(t--)  

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

			

    int main()

    {

    AsmShuvo()

    	

    	ll N, sum=0, i;

		cin>>N;

			

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

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

			sum = sum+i;

		    }

		}

		cout<<sum<<endl;

			



	}

	


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

int main(){

	long long int n,sum=0;

	scanf("%ld",&n);

		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;

		sum += i;

		}

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

 	return 0;

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

#include<string>

#include<algorithm>

#define LL long long

#define FIO ios_base::sync_with_stdio(false), cin.tie(NULL), cout.tie(NULL)

using namespace std;



int main()

{

	FIO;

	LL n, sum=0; cin>>n;

	for(LL i=1; i<=n; i++) if(i%3!=0&&i%5!=0) sum+=i;

	cout<<sum<<endl;

}

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

int main(){

	long long int n,sum=0;

	scanf("%ld",&n);

		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;

		sum += i;

		}

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

 	return 0;

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

using namespace std;

long long int math(long long int x)

{

	long long int ans;

	ans=x*(x+1)/2;

	return ans;

}

int main()

{

	ios_base::sync_with_stdio(false);

	cin.tie(NULL);

	cout.tie(NULL);

	long long int ff,n,fv,th,total,totalff,totalfv,totalth,ans;

	cin>>n;

	total= math(n);

	ff=n/15;

	totalff=15*math(ff);

	th=(n/3);

	totalth=3*math(th);

	fv=(n/5);

	totalfv=5*math(fv);

	ans=total-totalfv-totalth+totalff;

	cout<<ans;

}

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

int main(){

	long long int n,sum=0;

	scanf("%ld",&n);

		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;

		sum += i;

		}

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

 	return 0;

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

#include<cstdio>

#include<iomanip>

#include<algorithm>

#include<cstring>

#include<cmath>

#include<vector>

#include<map>

using namespace std;

string s[10005];

int main() 

{

	int n;

    cin>>n;

    long long ans=0;

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

    {

        if (i%3==0)

        continue;

        else if (i%5==0)

        continue;

        else

        ans+=i;

    }

    cout<<ans<<endl;

    return 0;

}




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

#include<iostream>

#include<algorithm>

#include<math.h>

using namespace std;

long long sum=0,n,i;

int main()

{

	scanf("%lld",&n);

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

	{

		if((i%3)==0)

			continue;

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

			continue;

		else

			sum+=i;

	}

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

	return 0;

}
// Slower C++ solution:
// writer: w33z8kqrqk8zzzx33

#include <bits/stdc++.h>

using namespace std;



// begin fast read template by CYJian (source: https://www.luogu.com.cn/paste/i11c3ppx)



namespace io {

	const int __SIZE = (1 << 21) + 1;

	char ibuf[__SIZE], *iS, *iT, obuf[__SIZE], *oS = obuf, *oT = oS + __SIZE - 1, __c, qu[55]; int __f, qr, _eof;

	#define Gc() (iS == iT ? (iT = (iS = ibuf) + fread (ibuf, 1, __SIZE, stdin), (iS == iT ? EOF : *iS ++)) : *iS ++)

	inline void flush () { fwrite (obuf, 1, oS - obuf, stdout), oS = obuf; }

	inline void gc (char &x) { x = Gc(); }

	inline void pc (char x) { *oS ++ = x; if (oS == oT) flush (); }

	inline void pstr (const char *s) { int __len = strlen(s); for (__f = 0; __f < __len; ++__f) pc (s[__f]); }

	inline void gstr (char *s) { for(__c = Gc(); __c < 32 || __c > 126 || __c == ' ';)  __c = Gc();

		for(; __c > 31 && __c < 127 && __c != ' '; ++s, __c = Gc()) *s = __c; *s = 0; }

	template <class I> inline bool gi (I &x) { _eof = 0;

		for (__f = 1, __c = Gc(); (__c < '0' || __c > '9') && !_eof; __c = Gc()) { if (__c == '-') __f = -1; _eof |= __c == EOF; }

		for (x = 0; __c <= '9' && __c >= '0' && !_eof; __c = Gc()) x = x * 10 + (__c & 15), _eof |= __c == EOF; x *= __f; return !_eof; }

	template <class I> inline void print (I x) { if (!x) pc ('0'); if (x < 0) pc ('-'), x = -x;

		while (x) qu[++ qr] = x % 10 + '0',  x /= 10; while (qr) pc (qu[qr --]); }

	struct Flusher_ {~Flusher_(){flush();}}io_flusher_;

} using io::pc; using io::gc; using io::pstr; using io::gstr; using io::gi; using io::print;



// end fast read template by CYJian



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

#define rep(i, a) iter(i, 0, a)

#define rep1(i, a) iter(i, 1, (a)+1)

#define log(a) cerr<<"\033[32m[DEBUG] "<<#a<<'='<<(a)<<" @ line "<<__LINE__<<"\033[0m"<<endl

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

#define fi first

#define se second

#define pb push_back

#define mp make_pair

 

using ll=long long;

using pii=pair<int, int>;

//#define int ll

const int MOD = 1000000007;



signed main() {

    ios_base::sync_with_stdio(false); cin.tie(0);

    int n; gi(n);

	ll ans = 0;

	rep1(i, n) if(i % 3 && i % 5) ans += i;

	print(ans);

}


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

typedef long long LL;



int n;



LL s(int x)

{

	int b = n / x * x, c;

	c = b / x + 1;

	return (LL)b * (LL)c / 2;	 

}



int main()

{		

		

	scanf("%d", &n);

	printf("%lld\n", s(1) - s(3) - s(5) + s(15));

			

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



int main()

{

    int i,n;

    unsigned long long s=0;

    scanf("%d",&n);

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

        if(i%3!=0 && i%5!=0) { s+=i; }

    }

    printf("%llu\n",s);



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



int main()

{

    int i,n;

    unsigned long long s=0;

    scanf("%d",&n);

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

        if(i%3!=0 && i%5!=0) { s+=i; }

    }

    printf("%llu\n",s);



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



int main()

{

    int i,n;

    unsigned long long s=0;

    scanf("%d",&n);

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

        if(i%3!=0 && i%5!=0) { s+=i; }

    }

    printf("%llu\n",s);



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



int main()

{

    int i,n;

    unsigned long long s=0;

    scanf("%d",&n);

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

        if(i%3!=0 && i%5!=0) { s+=i; }

    }

    printf("%llu\n",s);



    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.319160356513586x):
#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:
///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.7267120626735x):
#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:
/*    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.9975643528799325x):
#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;

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

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.8998780442726446x):
#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<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.8994658704500773x):
#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>

#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.9139902473205366x):
#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<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.3996707861415616x):
#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;

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

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



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

}