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

using namespace std;



int ar[100001];



int main()

{

    int N,temp;

    cin>>N;

    int cnt=0;

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

    {



        cin>>temp;

        if(temp>100000) cnt++;

        else ar[temp]++;

    }



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

    {

        if(ar[i]>=i) cnt+=(ar[i]-i);

        else cnt+=ar[i];

    }

    cout<<cnt<<endl;

}


// Faster C++ solution for the same problem (measured speedup: 1.4528369933633514x):
#include <iostream>

#include <string>

#include <map>

#include <vector>

#include <algorithm>

using namespace  std;

int main()

{

    int a,b;

    cin >> a ;

    map<int,int>::iterator it;

    map<int,int> mapa;

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

        cin >> b;

        it = mapa.find(b);

        if (it != mapa.end())

            mapa[b]++;

        else mapa.insert (std::pair<int,int>(b, 1) );

    }

    int removidas=0;

    for (it = mapa.begin(); it != mapa.end(); ++it) {

        if (it->first>it->second) removidas+=it->second;

        else if (it->first<it->second) removidas+=(it->second-it->first);

    }

    cout << removidas;



}
// Slower C++ solution:


/// 28-01-2018

/// MD:NUR ALAM

/// Eastern University of Bangladesh



#include "bits/stdc++.h"



#define sz(x) ((int)(x).size())

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

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

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

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

#define fors(i, s) for (int i = 0; s[i]; ++i)

#define rs(x) scanf("%s", (x))

#define mp make_pair

#define pb push_back

#define mso(X) memset((X), 0, sizeof((X)))

#define MS1(X) memset((X), -1, sizeof((X)))

#define len(X) strlen(x)

#define nur 100000

using namespace std;



typedef long long ll;

typedef uint64_t ull;

typedef long double lu;

typedef pair<int,int> pii;

typedef vector<int> vi;

typedef vector<pii> vpll;

typedef pair<int,int> Pll;

typedef map<string,int>msi;

typedef set<int>se;



template<class t> void _r(t &x) { cin >> x; }

void _r(int &x) { scanf("%d", &x); }

void _r(int64_t &x) { scanf("%lld", &x); }

void _r(double &x) { scanf("%lf", &x); }

void _r(char &x) { scanf(" %c", &x); }

void _r(char *x) { scanf("%s", x); }

void r() {}

template<class t, class... u> void r(t &head, u &... tail) { _r(head); r(tail...); }

template<class t> void _w(const t &x) { cout << x; }

void _w(const int &x) { printf("%d", x); }

void _w(const int64_t &x) { printf("%lld", x); }

void _w(const double &x) { printf("%.16f", x); }

void _w(const char &x) { putchar(x); }

void _w(const char *x) { printf("%s", x); }

template<class t,class u> void _w(const pair<t,u> &x) {_w(x.f); putchar(' '); _w(x.s);}

void w() {}

template<class t, class... u> void w(const t &head, const u &... tail) { _w(head); putchar(sizeof...(tail) ? ' ' : '\n'); w(tail...); }

template<class t, class... u> void debug(const t &head, const u &... tail) {

#ifdef HOME

#endif

}



///------------------------------------------------------------------------------------------------------------------------------------





int main()

{

    ll n,c=0,check[100005]={0};

    r(n);

    ll ar[n];



    rep(i,n){

        r(ar[i]);



        if(ar[i]>nur)

        {

            c++;

        }

        else if(ar[i]<=nur)

        {

            check[ar[i]]++;

        }

    }



    rep(i,nur){

        if(check[i]>i)

        {

            c = c+(check[i]-i);

        }

        else if(check[i]<i)

        {

            c = c+check[i];

        }

    }



    w(c);

}


// Faster C++ solution for the same problem (measured speedup: 1.9315475192195584x):
#include <iostream>

#include <string>

#include <map>

#include <vector>

#include <algorithm>

using namespace  std;

int main()

{

    int a,b;

    cin >> a ;

    map<int,int>::iterator it;

    map<int,int> mapa;

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

        cin >> b;

        it = mapa.find(b);

        if (it != mapa.end())

            mapa[b]++;

        else mapa.insert (std::pair<int,int>(b, 1) );

    }

    int removidas=0;

    for (it = mapa.begin(); it != mapa.end(); ++it) {

        if (it->first>it->second) removidas+=it->second;

        else if (it->first<it->second) removidas+=(it->second-it->first);

    }

    cout << removidas;



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

using namespace std;



int ar[100001];



int main()

{

    int N,temp;

    cin>>N;

    int cnt=0;

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

    {



        cin>>temp;

        if(temp>100000) cnt++;

        else ar[temp]++;

    }



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

    {

        if(ar[i]>=i) cnt+=(ar[i]-i);

        else cnt+=ar[i];

    }

    cout<<cnt<<endl;

}


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

using namespace std;



int main() {

	int n;



	cin >> n;



	map<int, int> cnt;



	int a;

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

		cin >> a;

		cnt[a]++;

	}



	int ans = 0;

	for (auto p : cnt) {

		int x = p.first;

		int c = p.second;



		if (c > x) {

			ans += c - x;

		}

		else if (c < x) {

			ans += c;

		}

	}



	cout << ans << endl;



	return 0;

}
// Slower C++ solution:


/// 28-01-2018

/// MD:NUR ALAM

/// Eastern University of Bangladesh



#include "bits/stdc++.h"



#define sz(x) ((int)(x).size())

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

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

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

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

#define fors(i, s) for (int i = 0; s[i]; ++i)

#define rs(x) scanf("%s", (x))

#define mp make_pair

#define pb push_back

#define mso(X) memset((X), 0, sizeof((X)))

#define MS1(X) memset((X), -1, sizeof((X)))

#define len(X) strlen(x)

#define nur 100000

using namespace std;



typedef long long ll;

typedef uint64_t ull;

typedef long double lu;

typedef pair<int,int> pii;

typedef vector<int> vi;

typedef vector<pii> vpll;

typedef pair<int,int> Pll;

typedef map<string,int>msi;

typedef set<int>se;



template<class t> void _r(t &x) { cin >> x; }

void _r(int &x) { scanf("%d", &x); }

void _r(int64_t &x) { scanf("%lld", &x); }

void _r(double &x) { scanf("%lf", &x); }

void _r(char &x) { scanf(" %c", &x); }

void _r(char *x) { scanf("%s", x); }

void r() {}

template<class t, class... u> void r(t &head, u &... tail) { _r(head); r(tail...); }

template<class t> void _w(const t &x) { cout << x; }

void _w(const int &x) { printf("%d", x); }

void _w(const int64_t &x) { printf("%lld", x); }

void _w(const double &x) { printf("%.16f", x); }

void _w(const char &x) { putchar(x); }

void _w(const char *x) { printf("%s", x); }

template<class t,class u> void _w(const pair<t,u> &x) {_w(x.f); putchar(' '); _w(x.s);}

void w() {}

template<class t, class... u> void w(const t &head, const u &... tail) { _w(head); putchar(sizeof...(tail) ? ' ' : '\n'); w(tail...); }

template<class t, class... u> void debug(const t &head, const u &... tail) {

#ifdef HOME

#endif

}



///------------------------------------------------------------------------------------------------------------------------------------





int main()

{

    ll n,c=0,check[100005]={0};

    r(n);

    ll ar[n];



    rep(i,n){

        r(ar[i]);



        if(ar[i]>nur)

        {

            c++;

        }

        else if(ar[i]<=nur)

        {

            check[ar[i]]++;

        }

    }



    rep(i,nur){

        if(check[i]>i)

        {

            c = c+(check[i]-i);

        }

        else if(check[i]<i)

        {

            c = c+check[i];

        }

    }



    w(c);

}


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

using namespace std;



int main() {

	int n;



	cin >> n;



	map<int, int> cnt;



	int a;

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

		cin >> a;

		cnt[a]++;

	}



	int ans = 0;

	for (auto p : cnt) {

		int x = p.first;

		int c = p.second;



		if (c > x) {

			ans += c - x;

		}

		else if (c < x) {

			ans += c;

		}

	}



	cout << ans << endl;



	return 0;

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

using namespace std;



int ar[100001];



int main()

{

    int N,temp;

    cin>>N;

    int cnt=0;

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

    {



        cin>>temp;

        if(temp>100000) cnt++;

        else ar[temp]++;

    }



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

    {

        if(ar[i]>=i) cnt+=(ar[i]-i);

        else cnt+=ar[i];

    }

    cout<<cnt<<endl;

}


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

using namespace std;

 

//Made with <3 by MinumCoklatPanas

typedef long long ll;

const ll INF = 1e9;

const ll INFF = 1e18;

const ll MAXN = 510;

const ll MOD = 1e9 + 7;

const double PI = acos(-1.0);

const double INFD = 1E9;

const double EPS = 1e-9;



map<ll,ll> frek;



int main()

{

	ios_base::sync_with_stdio(false);

	cin.tie(0);

	cout.tie(0);

	ll n;

	cin >> n;

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

	{

		ll ta;

		cin >> ta;

		frek[ta]++;

	}

	ll ans = 0;

	for (auto it : frek)

	{

		if (it.second >= it.first) ans += it.second - it.first;

		else ans += it.second;

	}

	cout << ans << endl;

	return 0;

}
// Slower C++ solution:


/// 28-01-2018

/// MD:NUR ALAM

/// Eastern University of Bangladesh



#include "bits/stdc++.h"



#define sz(x) ((int)(x).size())

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

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

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

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

#define fors(i, s) for (int i = 0; s[i]; ++i)

#define rs(x) scanf("%s", (x))

#define mp make_pair

#define pb push_back

#define mso(X) memset((X), 0, sizeof((X)))

#define MS1(X) memset((X), -1, sizeof((X)))

#define len(X) strlen(x)

#define nur 100000

using namespace std;



typedef long long ll;

typedef uint64_t ull;

typedef long double lu;

typedef pair<int,int> pii;

typedef vector<int> vi;

typedef vector<pii> vpll;

typedef pair<int,int> Pll;

typedef map<string,int>msi;

typedef set<int>se;



template<class t> void _r(t &x) { cin >> x; }

void _r(int &x) { scanf("%d", &x); }

void _r(int64_t &x) { scanf("%lld", &x); }

void _r(double &x) { scanf("%lf", &x); }

void _r(char &x) { scanf(" %c", &x); }

void _r(char *x) { scanf("%s", x); }

void r() {}

template<class t, class... u> void r(t &head, u &... tail) { _r(head); r(tail...); }

template<class t> void _w(const t &x) { cout << x; }

void _w(const int &x) { printf("%d", x); }

void _w(const int64_t &x) { printf("%lld", x); }

void _w(const double &x) { printf("%.16f", x); }

void _w(const char &x) { putchar(x); }

void _w(const char *x) { printf("%s", x); }

template<class t,class u> void _w(const pair<t,u> &x) {_w(x.f); putchar(' '); _w(x.s);}

void w() {}

template<class t, class... u> void w(const t &head, const u &... tail) { _w(head); putchar(sizeof...(tail) ? ' ' : '\n'); w(tail...); }

template<class t, class... u> void debug(const t &head, const u &... tail) {

#ifdef HOME

#endif

}



///------------------------------------------------------------------------------------------------------------------------------------





int main()

{

    ll n,c=0,check[100005]={0};

    r(n);

    ll ar[n];



    rep(i,n){

        r(ar[i]);



        if(ar[i]>nur)

        {

            c++;

        }

        else if(ar[i]<=nur)

        {

            check[ar[i]]++;

        }

    }



    rep(i,nur){

        if(check[i]>i)

        {

            c = c+(check[i]-i);

        }

        else if(check[i]<i)

        {

            c = c+check[i];

        }

    }



    w(c);

}


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

using namespace std;

 

//Made with <3 by MinumCoklatPanas

typedef long long ll;

const ll INF = 1e9;

const ll INFF = 1e18;

const ll MAXN = 510;

const ll MOD = 1e9 + 7;

const double PI = acos(-1.0);

const double INFD = 1E9;

const double EPS = 1e-9;



map<ll,ll> frek;



int main()

{

	ios_base::sync_with_stdio(false);

	cin.tie(0);

	cout.tie(0);

	ll n;

	cin >> n;

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

	{

		ll ta;

		cin >> ta;

		frek[ta]++;

	}

	ll ans = 0;

	for (auto it : frek)

	{

		if (it.second >= it.first) ans += it.second - it.first;

		else ans += it.second;

	}

	cout << ans << endl;

	return 0;

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

using namespace std;

int main(void){

   long long int data[100002],cmp[100002];

   long long int a,n,count=0;

   cin >> n;

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

       cin >> a;

       if(a>100000){

           count++;

           

       }

       else{cmp[a-1]=a;

       data[a-1]+=1;

       }

   }

   for(long long int i=0;i<100000;i++){

        

       if(cmp[i]!=data[i]){

            

          for(int j=0;j<100000;j++){

              if(cmp[i]==data[i] || data[i]==0){

                  break;

              }

              data[i]--;

              count++;

          }

         

       }

       

   }

   cout << count << endl;

    return 0;

}


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



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

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

#define rrrep(i,a,b) for(long long int i=(a);i>=(b);i--)

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

#define pb(q) push_back(q)

#define P pair<int,int>

#define Abs(a,b) max(a,b)-min(a,b)

#define YES(condition) if(condition){cout << "YES" << endl;}else{cout << "NO" << endl;}

#define Yes(condition) if(condition){cout << "Yes" << endl;}else{cout << "No" << endl;}

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



typedef long long ll;



using namespace std;







//while(x!=0){

            //sum+=x%10;

           // x/=10;

        //}

        //各桁の和



//pair<int,int> p[100000];

//P r[100000];

//cin >> tmp;

//p[i]=make_pair(tmp,i);

//cout << p[i].second+1 << endl;//ペアの右側つまりiを出力



//s.find(w[i])==string::npos

//findの使い方



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

   // b[i]=x%2;

    //x/=2;

  //}二進数



long long int n,cnt=0,ans=0,a[1000000],b,c,cmp[10000000],data,m,h,w,x,y,xcmp,ycmp,sum=0;

                                               //1000000000

string s;



vector<int> z;



int main(void){

       cin.tie(0);

    ios::sync_with_stdio(false);



       cin >> n;

       rep(i,n){

           cin >> a[i];

          // cmp[a[i]]++;

       }

       sort(a,a+n);

       rep(i,n){

           if(i==0){

               cmp[cnt]++;

           }

           if(a[i]!=a[i+1]){

               cnt++;

               cmp[cnt]++;

           }

           else{

               cmp[cnt]++;

           }

       }

       //Cout(cmp[0]);

       cnt=0;

       rep(i,n){

           if(a[i]!=cmp[cnt]){

               ans++;

               cmp[cnt]--;

           }

           if(a[i]!=a[i+1]){

               cnt++;

           }

       }

       Cout(ans);

return 0;

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

#include<iomanip>

#include<string.h>

using namespace std;

int main()

{

	int x,n=0;

	long long sum=2;

	cin>>x;

	do

	{

		sum=sum+1+(sum+1);

		n=n+1;

	}

	while(n<x);

	cout<<sum;

	return 0;

}

// Faster C++ solution for the same problem (measured speedup: 5.247935851081391x):
#include<cstdio>

using namespace std;

long long n,f[200];  

int main()

{

  scanf("%lld",&n);f[0]=2;

  for(int i=1;i<=n;i++)  f[i]=f[i-1]*2+2;

  printf("%lld\n",f[n]);

  return 0;

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

using namespace std;

long long n;

long long srd[1000001]={2};

void dg(long long n){

	srd[n]=srd[n-1]*2+2;

	return;

}    

int main(){

	cin>>n;

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

		dg(i);

	cout<<srd[n];

	return 0;

}

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

long long f(int x){

    if(x==0){

        return 2;

    }else{

        return f(x-1)*2+2;

    }



}

int main(){

    int x;

    scanf("%d",&x);

    printf("%lld",f(x));

    return 0;

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

using namespace std;

int main()

{

    long long x,y=2;

    cin>>x;

    for(int i=0;i<x;i++)

    {

    y=2*y+2;

	}

    cout<<y<<endl;

    return 0;

}

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

long long f(int x){

    if(x==0){

        return 2;

    }else{

        return f(x-1)*2+2;

    }



}

int main(){

    int x;

    scanf("%d",&x);

    printf("%lld",f(x));

    return 0;

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

using namespace std;

long long n,ans=2;

int main()

{

   cin>>n;

   for(int i=1;i<=n;i++) ans=ans*2+2;

   cout<<ans<<"\n";

   return 0;

}

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

long long f(int x){

    if(x==0){

        return 2;

    }else{

        return f(x-1)*2+2;

    }



}

int main(){

    int x;

    scanf("%d",&x);

    printf("%lld",f(x));

    return 0;

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

using namespace std;

int main()

{

	int n;

	long long a[50];

	cin>>n;

	a[0]=2;

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

	{

		a[i]=2*a[i-1]+2;

	}

	cout<<a[n];

	return 0;

}

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

long long f(int x){

    if(x==0){

        return 2;

    }else{

        return f(x-1)*2+2;

    }



}

int main(){

    int x;

    scanf("%d",&x);

    printf("%lld",f(x));

    return 0;

}
// Slower C++ solution:
#include<bits/stdc++.h>//头文件不多说

using namespace std;

long long a,b=2;//一定要用long long,否则在#31-#41会WA

int main(){

    cin>>a;

    for(int i=0;i<a;i++)b=(b+1)*2;//乘法分配律

    cout<<b<<endl;

}

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

long long f(int x){

    if(x==0){

        return 2;

    }else{

        return f(x-1)*2+2;

    }



}

int main(){

    int x;

    scanf("%d",&x);

    printf("%lld",f(x));

    return 0;

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

using namespace std;

int n;

long long f[100];

int main()

{

    cin >> n;

    f[0] = 2;

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

    {

        f[i] = f[i-1]*2+2;

    }

    cout << f[n] << endl;

    return 0;

}

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

long long f(int x){

    if(x==0){

        return 2;

    }else{

        return f(x-1)*2+2;

    }



}

int main(){

    int x;

    scanf("%d",&x);

    printf("%lld",f(x));

    return 0;

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

using namespace std;

long long a[41];

int main()

{

	a[0]=2;

	int n;

	scanf("%d",&n);

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

	  a[i]=a[i-1]*2+2;

	printf("%lld\n",a[n]);

	return 0;

}

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

long long f(int x){

    if(x==0){

        return 2;

    }else{

        return f(x-1)*2+2;

    }



}

int main(){

    int x;

    scanf("%d",&x);

    printf("%lld",f(x));

    return 0;

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

#include<cstdio>

using namespace std;

long long f0=2,f1,t,n;

int main()

{

	cin>>n;

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

	{

		f1=f0*2+2;

		t=f0;

		f0=f1;

		f1=t;

	}

	cout<<f0<<'\n';

}

// Faster C++ solution for the same problem (measured speedup: 5.250162283055399x):
#include<cstdio>

#include<cstring>

//#include<Hatsune_Miku>

long long h[50]={2};

int n;

int main(){

    scanf("%d",&n);

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

    	h[i]=h[i-1]*2+2;

    }

    printf("%lld\n",h[n]);

    return 0;

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

#include<cstdio>

#include<cstring>

#include<algorithm>

#include<vector>

#include<map>

#include<queue>

#include<cmath>

#include<stack>

#include<set>

#define ll long long

#define maxn 200005

#define re register

#define inf 1e9

#define eps 1e-10

using namespace std;



inline int read()

{

	int x=0,w=1; char c=getchar();

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

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

	return w==1?x:-x;

}



void write(int x)

{

	if(x>=10) write(x/10);

	putchar(x%10+'0');

}



ll f[45];



int main()

{

	int n; cin>>n;

	f[0]=2;

	for(int i=1;i<=n;i++) f[i]=f[i-1]*2+2;

	cout<<f[n];

	return 0;

}

// Faster C++ solution for the same problem (measured speedup: 5.247087219999169x):
#include<cstdio>

#include<cstring>

//#include<Hatsune_Miku>

long long h[50]={2};

int n;

int main(){

    scanf("%d",&n);

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

    	h[i]=h[i-1]*2+2;

    }

    printf("%lld\n",h[n]);

    return 0;

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

#include<cstdio>

using namespace std;

long long f0=2,f1,t,n;

int main()

{

	cin>>n;

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

	{

		f1=f0*2+2;

		t=f0;

		f0=f1;

		f1=t;

	}

	cout<<f0<<'\n';

}

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



int main()

{

	long long n, x = 2, i;



	scanf("%lld", &n); 

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

		x = 2 * (x + 1);

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



	return 0;

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

#include<cstdio>

#include<cstring>

#include<algorithm>

#include<vector>

#include<map>

#include<queue>

#include<cmath>

#include<stack>

#include<set>

#define ll long long

#define maxn 200005

#define re register

#define inf 1e9

#define eps 1e-10

using namespace std;



inline int read()

{

	int x=0,w=1; char c=getchar();

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

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

	return w==1?x:-x;

}



void write(int x)

{

	if(x>=10) write(x/10);

	putchar(x%10+'0');

}



ll f[45];



int main()

{

	int n; cin>>n;

	f[0]=2;

	for(int i=1;i<=n;i++) f[i]=f[i-1]*2+2;

	cout<<f[n];

	return 0;

}

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



int main()

{

	long long n, x = 2, i;



	scanf("%lld", &n); 

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

		x = 2 * (x + 1);

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



	return 0;

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

#include<algorithm>

#include<string>

//#include<Hatsune_Miku>

using namespace std;

 long long f[420001]={2};

int n,ans=0;

int main()

{

	std::ios::sync_with_stdio(false);

	cin>>n;

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

	{

		f[i]=f[i-1]*2+2;

	}

	cout<<f[n]<<endl;

    return 0;

}

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



int main()

{

	long long n, x = 2, i;



	scanf("%lld", &n); 

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

		x = 2 * (x + 1);

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



	return 0;

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

using namespace std;

long long n,f=2;

int main(void){

    scanf ("%lld",&n);

    while (n--)f=f*2+2;

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

}

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



int main()

{

	long long n, x = 2, i;



	scanf("%lld", &n); 

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

		x = 2 * (x + 1);

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



	return 0;

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

using namespace std;

long long f[100];

int main()

{

	f[0]=2;

	int n;

	cin>>n;

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

		f[i]=f[i-1]*2+2;

	cout<<f[n]<<endl;

	return 0;

}

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



int main()

{

	long long n, x = 2, i;



	scanf("%lld", &n); 

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

		x = 2 * (x + 1);

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



	return 0;

}
// Slower C++ solution:
#pragma GCC optimize(2)

#include<bits/stdc++.h>

#define maxn 511

#define LL long long

#define maxm 10011

using namespace std;

typedef long long ll;

const LL inf=1e15;ll n;

ll work(ll x,ll i){

	if(i==n) return x;

	else {

		i++;

		return work(x*2+2,i);

	}

}

int main(){

	ll ans;

	cin>>n;

	ans=work(2,0);

	cout<<ans;

}


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



int main()

{

	long long n, x = 2, i;



	scanf("%lld", &n); 

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

		x = 2 * (x + 1);

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



	return 0;

}