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



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

using namespace std;



typedef long long ll;



const int INF = 1 << 30;

const ll LLINF = 1LL << 62;



int mod = 1000000007;



struct edge{

    int to;

    ll cost;

};



vector<edge> nodes[100000];

ll zahyou[100000];



void init(){

    rep(i, 100000) zahyou[i] = -mod;

}



bool dfs(int p, int s){

    bool ret = true;

    rep(i, nodes[s].size()){

        int to = nodes[s][i].to;

        ll cost = nodes[s][i].cost;

        if(zahyou[to] == -mod){

            zahyou[to] = zahyou[s] + cost;

            ret &= dfs(s, to);

        }

        else{

            if(zahyou[to] != zahyou[s] + cost) ret = false;

        }

    }

    return ret;

}



int main(void){

    ios::sync_with_stdio(false);

    cin.tie(nullptr);

    init();

    int N, M; cin >> N >> M;

    rep(i, M){

        int l, r; ll c;

        cin >> l >> r >> c; l--; r--;

        edge e; e.cost = c; e.to = r;

        nodes[l].push_back(e);

        e.cost *= -1; e.to = l;

        nodes[r].push_back(e);

    }

    bool ok = true;

    rep(i, N){

        if(zahyou[i] == -mod){

            zahyou[i] = 0;

            ok &= dfs(-1, i);

        }

    }

    if(ok) cout << "Yes" << endl;

    else cout << "No" << endl;

    return 0;

}

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



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

using namespace std;



typedef long long ll;



const int INF = 1 << 30;

const ll LLINF = 1LL << 62;



int mod = 1000000007;



struct edge{

    int to;

    int cost;

    edge(int t, int c){

        to = t;

        cost = c;

    }

};



vector<edge> nodes[100000];

int zahyou[100000];



void init(){

    rep(i, 100000) zahyou[i] = mod;

}



bool dfs(int p, int s){

    bool res = true;

    rep(i, nodes[s].size()){

        int to = nodes[s][i].to;

        if(to == p) continue;

        int cost = nodes[s][i].cost;

        if(zahyou[to] == mod){

            zahyou[to] = zahyou[s] + cost;

            res &= dfs(s, to);

        }

        else if(zahyou[to] != zahyou[s] + cost) return false;

    }

    return res;

}







int main(void){

    ios::sync_with_stdio(false);

    cin.tie(nullptr);

    init();

    int N, M; cin >> N >> M;

    rep(i, M){

        int l, r, d; cin >> l >> r >> d;

        l--; r--;

        nodes[l].push_back(edge(r, d));

        nodes[r].push_back(edge(l, -d));

    }

    bool ok = true;

    rep(i, N){

        if(zahyou[i] == mod){

            zahyou[i] = 0;

            ok &= dfs(-1, i);

        }

    }

    if(ok) cout << "Yes" << endl;

    else cout << "No" << endl;

    return 0;

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

#include <cstring>

#include <vector>

#include <map>

#include <set>

#include <queue>

#include <deque>

#include <algorithm>

#define INF 1000000000000000LL

using namespace std;

struct edge {int to; long long int cost; };

int main()

{

	int n, m, l, r;

	long long int d, x[100000];

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

	vector<edge> v[100000];

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

		scanf("%d %d %lld", &l, &r, &d);

		l--;

		r--;

		edge e;

		e.to=r, e.cost=d;

		v[l].push_back(e);

		e.to=l, e.cost=-d;

		v[r].push_back(e);

	}

	queue<int> que;

	set<int> st;

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

		x[i]=INF;

		st.insert(i);

	}

	while(!st.empty()){

		auto itr=st.begin();

		int n0=*itr;

		que.push(n0);

		x[n0]=0;

		while(!que.empty()){

			int k=que.front();

			que.pop();

			if(st.find(k)==st.end()) continue;

			st.erase(k);

			for(int i=0; i<v[k].size(); i++){

				edge e=v[k][i];

				if(x[e.to]==INF){

					x[e.to]=x[k]+e.cost;

				}else if(x[e.to]!=x[k]+e.cost){

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

					return 0;

				}

				que.push(e.to);

			}

		}

	}

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

	return 0;

}

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

#include <cstring>

#include <iostream>

#include <string>

#include <cmath>

#include <bitset>

#include <vector>

#include <map>

#include <set>

#include <queue>

#include <deque>

#include <algorithm>



using namespace std;

typedef long long int ll;

typedef pair<int, int> P;



int par[100002];

int rk[100002];

ll dw[100002];



void init(int n){

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

		par[i]=i;

	}

}



int root(int x){

	if(par[x]==x) return x;

	int p=root(par[x]);

	dw[x]+=dw[par[x]];

	return par[x]=p;

}



ll weight(int x){

	root(x);

	return dw[x];

}



ll diff(int x, int y){

	return weight(y)-weight(x);

}



bool unite(int x, int y, ll w){

	w=w+weight(x)-weight(y);

	x=root(x); y=root(y);

	if(x==y){

		if(w!=0) return false;

	}

	if(rk[x]<rk[y]) swap(x, y), w=-w;

	if(rk[x]==rk[y]) rk[x]++;

	par[y]=x;

	dw[y]=w;

	return true;

}



int main()

{

	int n, m;

	cin>>n>>m;

	init(n);

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

		int l, r;

		ll d;

		cin>>l>>r>>d;

		l--; r--;

		if(!unite(l, r, d)){

			cout<<"No"<<endl;

			return 0;

		}

	}

	cout<<"Yes"<<endl;

	return 0;

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

#include <vector>

using namespace std;

 

typedef long long int ll;

typedef pair<ll, ll> P;



ll INF = 1000000000000;

 

ll N, M, L[200000], R[200000], D[200000];

vector< vector<P> > G(100001);

vector<ll> num(100001);

string ans;

 

void dfs(int now){    

 

    for(int i=0;i<G[now].size();i++){

        P nextP = G[now][i];

        int nextNode = nextP.first;

        int nextCost = nextP.second;

 

        if(num[nextNode] == INF){

            num[nextNode] = num[now] + nextCost;

            dfs(nextNode);

        } else {

            if(num[nextNode] != num[now] + nextCost)  ans = "No";

        }

        

    }

}

 

int main(){

    cin >> N >> M;

    for(int i=0;i<M;i++)    cin >> L[i] >> R[i] >> D[i];

 

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

        G[ L[i] ].push_back( P(R[i], D[i]) );

        G[ R[i] ].push_back( P(L[i], -1 * D[i]) );

    }

    

    for(int i=1;i<=N;i++)   num[i] = INF;

 

    ans = "Yes";

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

        if(num[i] == INF){

            num[i] = 0;

            dfs(i);

        }

        if(ans == "No") break;

    }

 

    cout << ans << endl;

}

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

using namespace std;



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

#define repr(i, n) for(int i = (n-1); i >= 0; --i)



template<class T>bool chmax(T &a, const T &b) { if (a<b) { a=b; return 1; } return 0; }

template<class T>bool chmin(T &a, const T &b) { if (b<a) { a=b; return 1; } return 0; }



typedef long long ll;

typedef pair<int, int> P;



const int MAX = 100005;

const int INF = 1001001001;

const int MOD = 1000000007;



struct edge {

    int to, cost;

    edge(int to, int cost) : to(to), cost(cost) {}

};



vector<edge> G[MAX];

vector<bool> first;



ll dp[MAX];

bool dfs(int v) {

    bool res = true;

    for (edge e : G[v]) {

        int u = e.to, d = e.cost;

        if (dp[u] < 0) {

            dp[u] = dp[v] + d;

            res &= dfs(u);

        } else {

            if (dp[u] != dp[v] + d) return false;

        }

    }

    return res;

}



//頂点の入次数を管理

int h[100010];



int main(){

    int N, M;

    cin >> N >> M;



    first.resize(N, true);



    rep(i, M) {

        int l, r, d;

        cin >> l >> r >> d;

        l--, r--;

        G[l].emplace_back(r, d);

        h[r]++;

        first[r] = false;

    }



    stack<int> st;

    rep(i, N) if (h[i] == 0) st.emplace(i);



    vector<int> res;

    while (st.size()) {

        int i = st.top(); st.pop();

        res.push_back(i);

        for (edge e : G[i]) {

            int u = e.to;

            h[u]--;

            if (h[u] == 0) st.push(u);

        }

    }



    if (res.size() != N) {

        cout << "No" << endl;

        return 0;

    }



    bool ans = true;

    rep(i, N) dp[i] = -1;



    rep(i, N) {

        if (first[i] && dp[i] < 0) {

            dp[i] = 0;

            ans &= dfs(i);

        }

        if (!ans) break;

    }



    cout << (ans? "Yes" : "No") << endl;

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



int n,cnt;

long long sum;



int main(){

	scanf("%d",&n);

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

		if(i%2==0||i%3==0||i%5==0) printf("%d ",i), sum+=i, ++cnt;

		if(cnt==n-2) break;

	}

	sum%=30; sum+=60;

	if(sum&1){

		printf("29997 %d",30033-sum);

	}

	else{

		for(int i=5;;i+=5)

			if((sum-i)%3==0&&sum-i>=3){

				printf("%d %d",30000-i,30000-sum+i);

				break;

			}

	}

	return 0;

}

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

#include<cstring>

#include<algorithm>

#define MN 30000

using namespace std;

inline int in(){

    int x=0;bool f=0; char c;

    for (;(c=getchar())<'0'||c>'9';f=c=='-');

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

    return f?-x:x;

}

int odd[MN+5],evn[3][MN+5],n,tot,cnt;

int main()

{

	n=in();

	if (n==3) {printf("2 5 63");return 0;}

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

		if (i&1){

			if (!(i%3)) odd[++cnt]=i;

		}else {

			evn[i%3][++evn[i%3][0]]=i;

		}

	}tot=n;

	if (n&1){

		for (int i=2;i<=5000&&tot>3;i+=2){

			tot-=2;printf("%d %d ",odd[i-1],odd[i]);

		}

		for (int i=1;i<=5000&&tot>=2;++i){

			tot-=2;printf("%d %d ",evn[1][i],evn[2][i]);

		}

		for (int i=1;i<=5000&&tot;++i){

			--tot;printf("%d ",evn[0][i]);

		}

	}else{

		for (int i=2;i<=5000&&tot>2;i+=2){

			tot-=2;printf("%d %d ",odd[i-1],odd[i]);

		}

		for (int i=1;i<=5000&&tot>=2;++i){

			tot-=2;printf("%d %d ",evn[1][i],evn[2][i]);

		}

		for (int i=1;i<=5000&&tot;++i){

			--tot;printf("%d ",evn[0][i]);

		}

	}return 0;

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

using namespace std;

int pr[30002],n,i,vis[30002];

int main(){

	

	vector <int> v;

	int sum=0;

	cin>>n;

	if(n==3){

		cout<<"2 5 63"<<endl;

		return 0;

	}

	for(i=30000;i>=2;i=i-2){

		if(n>2){

			v.push_back(i);

			vis[i]=1;

			n--;

			sum+=i;

			if(i==8 && n%2==0 && sum%3==0)

			break;

			if(i==6 && n%2==0 && sum%3==0)

			break;

			if(i==4 && n%2==0 && sum%3==0)

			break;

		}

		else

		break;

	}

	int j=3;

	while(n){

		if(sum%j==0 && vis[j]==0){

			for(i=j;i<30000 && n!=0 ;i=i+j)

				if(vis[i]==0 && i%2==1){

					v.push_back(i);

					vis[i]=1;

					n--;

					sum+=i;

				}

		}

		j=j+2;

	}

	for(i=0;i<v.size();i++)

		cout<<v[i]<<endl;

}

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

#include<algorithm>

#include<cstring>

#define MN 30005

using namespace std;

int n,num,ans[MN];

int main(){

	scanf("%d",&n);

	if(n==3){puts("2 5 63");}

	else {

		ans[++num]=2;ans[++num]=4;

		for(int i=6;num+2<=n&&i+3<=30000;i+=12)ans[++num]=i-3,ans[++num]=i+3;

		for(int i=6;num+2<=n&&i+4<=30000;i+=6)ans[++num]=i+2,ans[++num]=i+4;

		for(int i=6;num+1<=n&&i<=30000;i+=6)ans[++num]=i;

		for(int i=1;i<=num;i++)printf("%d ",ans[i]);

	}

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



using namespace std;



int n, u[30005];

vector <int> ans;



int main(){

      cin >> n;



      if(n == 3){

            cout << "2 5 63";

            return 0;

      }



      int odd = 15;



      ans.push_back(3);

      ans.push_back(9);

      n -= 2;

      if(n % 3 == 1){

            n -= 2;

            ans.push_back(15);

            ans.push_back(21);

            odd = 27;

      }



      for(int i = 2; i <= 30000; i += 2){

            if(n > 0){

                  ans.push_back(i);

                  n --;

            }

      }



      if(n % 2){

            n ++;

            ans.pop_back();

      }



      while(n > 0){

            ans.push_back(odd);

            ans.push_back(odd + 6);

            odd += 12;

            n -= 2;

      }



      for(auto i : ans)

            cout << i << " ";

}


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

#include<algorithm>

#include<cstring>

#define MN 30005

using namespace std;

int n,num,ans[MN];

int main(){

	scanf("%d",&n);

	if(n==3){puts("2 5 63");}

	else {

		ans[++num]=2;ans[++num]=4;

		for(int i=6;num+2<=n&&i+3<=30000;i+=12)ans[++num]=i-3,ans[++num]=i+3;

		for(int i=6;num+2<=n&&i+4<=30000;i+=6)ans[++num]=i+2,ans[++num]=i+4;

		for(int i=6;num+1<=n&&i<=30000;i+=6)ans[++num]=i;

		for(int i=1;i<=num;i++)printf("%d ",ans[i]);

	}

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

using namespace std;

int pr[30002],n,i,vis[30002];

int main(){

	

	vector <int> v;

	int sum=0;

	cin>>n;

	if(n==3){

		cout<<"2 5 63"<<endl;

		return 0;

	}

	for(i=30000;i>=2;i=i-2){

		if(n>2){

			v.push_back(i);

			vis[i]=1;

			n--;

			sum+=i;

			

			if(i==12 && n%2==0 && sum%3==0)

			break;

			if(i==10 && n%2==0 && sum%3==0)

			break;

			if(i==8 && n%2==0 && sum%3==0)

			break;

			if(i==6 && n%2==0 && sum%3==0)

			break;

			if(i==4 && n%2==0 && sum%3==0)

			break;

		}

		else

		break;

	}

	int j=3;

	while(n){

		if(sum%j==0 && vis[j]==0){

			for(i=j;i<30000 && n!=0 ;i=i+j)

				if(vis[i]==0 && i%2==1){

					v.push_back(i);

					vis[i]=1;

					n--;

					sum+=i;

				}

		}

		j=j+2;

	}

	for(i=0;i<v.size();i++)

		cout<<v[i]<<endl;

}

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

#include<algorithm>

#define MAXN 20006

using namespace std;

int a[MAXN],cnt,n;

int main()

{

	scanf("%d",&n);

	if(n==3)

	{

		printf("2 5 63");

		return 0;

	}

	cnt=4;

	n-=4;

	a[1]=3;

	a[2]=9;

	a[3]=2;

	a[4]=4;

	while(n>=2&&a[cnt]+6<=30000)

	{

		n-=2;

		cnt++;

		a[cnt]=a[cnt-1]+4;

		cnt++;

		a[cnt]=a[cnt-1]+2;

	}

	while(n>=2&&(a[cnt]%2==0||a[cnt]+4*3<=30000))

	{

		n-=2;

		cnt++;

		if(a[cnt-1]%2==0) a[cnt]=15;

		else a[cnt]=a[cnt-1]+6;

		cnt++;

		a[cnt]=a[cnt-1]+6;

	}

	while(n>=1&&(a[cnt]%6!=0||a[cnt]+6<=30000))

	{

		n--;

		cnt++;

		if(a[cnt-1]%6!=0) a[cnt]=6;

		else a[cnt]=a[cnt-1]+6;

	}

	sort(a+1,a+1+cnt);

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

		printf("%d ",a[i]);

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

#include<string>

using namespace std;

int main()

{

    int a,b;

    char c;

    cin>>a>>c>>b;

    if(c=='-')

    cout<<a-b;

    else

    cout<<a+b;

    system("pause");

    }


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

int main()

{

	long long a,b;

	char c;

		scanf("%lld",&a);

		scanf(" %c ",&c);

		scanf("%lld",&b);

		if(c=='-')

		{

			printf("%lld\n",a-b);

		}

		else

		{

			printf("%lld\n",a+b);

		}

	return 0;

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

using namespace std;

int main(){

int a,b,sum=0;

char h;

cin>>a>>h>>b;

if(h=='+'){

    sum=a+b;

}

if(h=='-'){

    sum=a-b;

}

    cout<<sum<<endl;

    return 0;

}


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

int main()

{

	long long a,b;

	char c;

		scanf("%lld",&a);

		scanf(" %c ",&c);

		scanf("%lld",&b);

		if(c=='-')

		{

			printf("%lld\n",a-b);

		}

		else

		{

			printf("%lld\n",a+b);

		}

	return 0;

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

#include<string>

using namespace std;

int main()

{

    int a,b;

    char c;

    cin>>a>>c>>b;

    if(c=='-')

    cout<<a-b;

    else

    cout<<a+b;

    system("pause");

    }


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

int main()

{

	

	int a = 0,b = 0;

	char c;

	scanf ("%d %c %d",&a,&c,&b);

	switch (c){

		case '+':printf ("%d",a + b);break;

		case '-':printf ("%d",a - b);

		}

	return 0;

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

using namespace std;

int main(){

int a,b,sum=0;

char h;

cin>>a>>h>>b;

if(h=='+'){

    sum=a+b;

}

if(h=='-'){

    sum=a-b;

}

    cout<<sum<<endl;

    return 0;

}


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

int main()

{

	

	int a = 0,b = 0;

	char c;

	scanf ("%d %c %d",&a,&c,&b);

	switch (c){

		case '+':printf ("%d",a + b);break;

		case '-':printf ("%d",a - b);

		}

	return 0;

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

#include<cstdio>

#include<cstring>

using namespace std;



int n,m,dp[5][10010];

char a;

bool ans;



int main()

{

	int i;

	cin>>n>>a>>m;

	if(a=='+') cout<<n+m;

	else cout<<n-m;

}

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

int main()

{

	

	int a = 0,b = 0;

	char c;

	scanf ("%d %c %d",&a,&c,&b);

	switch (c){

		case '+':printf ("%d",a + b);break;

		case '-':printf ("%d",a - b);

		}

	return 0;

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

using namespace std ;

long long a , b , ans ;

char c ;

int main()

{

	cin >> a >> c >> b ;

	if ( c=='-' ) 

		cout << a-b ;

	else

		cout <<  a+ b ;



}

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

int main()

{

	

	int a = 0,b = 0;

	char c;

	scanf ("%d %c %d",&a,&c,&b);

	switch (c){

		case '+':printf ("%d",a + b);break;

		case '-':printf ("%d",a - b);

		}

	return 0;

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

#include<string>

using namespace std;

int main()

{

    int a,b;

    char c;

    cin>>a>>c>>b;

    if(c=='-')

    cout<<a-b;

    else

    cout<<a+b;

    system("pause");

    }


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

int main()

{

	long long a,b;

	char op;

	scanf("%lld %c %lld",&a,&op,&b);

	if(op=='+')   printf("%lld\n",a+b);

	if(op=='-')   printf("%lld\n",a-b);

	return 0;

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

using namespace std;

int main(){

int a,b,sum=0;

char h;

cin>>a>>h>>b;

if(h=='+'){

    sum=a+b;

}

if(h=='-'){

    sum=a-b;

}

    cout<<sum<<endl;

    return 0;

}


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

int main()

{

	long long a,b;

	char op;

	scanf("%lld %c %lld",&a,&op,&b);

	if(op=='+')   printf("%lld\n",a+b);

	if(op=='-')   printf("%lld\n",a-b);

	return 0;

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

#include<cstdio>

#include<cstring>

using namespace std;



int n,m,dp[5][10010];

char a;

bool ans;



int main()

{

	int i;

	cin>>n>>a>>m;

	if(a=='+') cout<<n+m;

	else cout<<n-m;

}

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

int main()

{

	long long a,b;

	char op;

	scanf("%lld %c %lld",&a,&op,&b);

	if(op=='+')   printf("%lld\n",a+b);

	if(op=='-')   printf("%lld\n",a-b);

	return 0;

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

using namespace std ;

long long a , b , ans ;

char c ;

int main()

{

	cin >> a >> c >> b ;

	if ( c=='-' ) 

		cout << a-b ;

	else

		cout <<  a+ b ;



}

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

int main()

{

	long long a,b;

	char op;

	scanf("%lld %c %lld",&a,&op,&b);

	if(op=='+')   printf("%lld\n",a+b);

	if(op=='-')   printf("%lld\n",a-b);

	return 0;

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

using namespace std;

int main()

{

	int x, y;

	char op;

	cin >> x >> op >> y;

	switch (op)

	{

	case '+':

		cout << x + y << endl;

		break;

	case'-':

		cout << x - y << endl;

	default:

		break;

	}

	return 0;

}


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

int main()

{

	long long a,b;

	char op;

	scanf("%lld %c %lld",&a,&op,&b);

	if(op=='+')   printf("%lld\n",a+b);

	if(op=='-')   printf("%lld\n",a-b);

	return 0;

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

using namespace std;

int main() {

  long long a,b;

  char op;

  cin>>a>>op>>b;

 

  if(op=='+'){

    cout<<a+b<<endl;

  }

  else{

  	

    cout<<a-b;

  }

 

}

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

int main()

{

	long long a,b;

	char op;

	scanf("%lld %c %lld",&a,&op,&b);

	if(op=='+')   printf("%lld\n",a+b);

	if(op=='-')   printf("%lld\n",a-b);

	return 0;

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



using namespace std;



int main()

{

    int x , y ;

    char op;

    cin >> x >> op >> y ;

    if (op=='+'){

        cout<< x+y << endl;

    }else{

    cout << x-y<<endl;

    }

    return 0;

}


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

int main()

{

	long long a,b;

	char op;

	scanf("%lld %c %lld",&a,&op,&b);

	if(op=='+')   printf("%lld\n",a+b);

	if(op=='-')   printf("%lld\n",a-b);

	return 0;

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

#include<string>

using namespace std;



int main()

{



int a;cin>>a;

char op;cin>>op;

int b;cin>>b;

if(op=='+')

{

    cout<<a+b;

}else

{

    cout<<a-b;

}

    return 0;

}


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

int main()

{

	long long a,b;

	char op;

	scanf("%lld %c %lld",&a,&op,&b);

	if(op=='+')   printf("%lld\n",a+b);

	if(op=='-')   printf("%lld\n",a-b);

	return 0;

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



using namespace std;



int main()



{

        int a,b;

     char op;

     cin>>a>>op>>b;

     if(op=='+')

        cout<<a+b<<endl;

     else

        cout<<a-b<<endl;

}

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

int main()

{

	long long a,b;

	char op;

	scanf("%lld %c %lld",&a,&op,&b);

	if(op=='+')   printf("%lld\n",a+b);

	if(op=='-')   printf("%lld\n",a-b);

	return 0;

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

using namespace std;

int main() {



int a,b;

cin>> a;

char c;

cin>>c>>b;



if(c=='+'){

int sum =0;

sum= a+b;

cout << sum;  

}else if(c=='-'){

  int sub =0;

  sub = a-b;

  cout<<sub;

}

}

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

int main()

{

	long long a,b;

	char op;

	scanf("%lld %c %lld",&a,&op,&b);

	if(op=='+')   printf("%lld\n",a+b);

	if(op=='-')   printf("%lld\n",a-b);

	return 0;

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

#include<stdio.h>

using namespace std;

int main()

{

	long long a,b;

	char op;

	scanf("%lld %c %lld",&a,&op,&b);

    if(op=='+')

	{

		printf("%lld\n",a+b);

	}

	else if(op=='-')

	{

		printf("%lld\n",a-b);

	}

	else if(op=='*')

	{

		printf("%lld\n",a*b);

	}

	else if(op=='/'&&b>1e-6)

	{

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

	}

	return 0;

}

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

int main()

{

	long long a,b;

	char op;

	scanf("%lld %c %lld",&a,&op,&b);

	if(op=='+')   printf("%lld\n",a+b);

	if(op=='-')   printf("%lld\n",a-b);

	return 0;

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



using namespace std;

 

typedef long long ll;

#define For(i,x,y) for(int i=x; i<y; ++i)

#define mem(x,y) memset(x,y,sizeof(x))

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

#define PII pair<int,int>

#define INF 0x3f3f3f3f

#define DOF 0x7f7f7f7f

#define se second

#define fi first

#define endl '\n'

 

template <typename T>

inline void read(T &r){

    static char c; r=0; int f=1;

    for(c=getchar(); c<'0'||c>'9'; c=getchar()) if(c=='-')f=-1; 

    for(; c>='0'&&c<='9'; r=(r<<1)+(r<<3)+(c^48),c=getchar());

    r*=f;

} // -_-



const int N = 220;



int main(){

    ll a, b; char c;

    scanf("%lld %c %lld",&a, &c, &b);

    if(c == '-') b = -b;

    printf("%lld\n", a + b);

    // system("pause");

}

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

int main()

{

	long long a,b;

	char op;

	scanf("%lld %c %lld",&a,&op,&b);

	if(op=='+')   printf("%lld\n",a+b);

	if(op=='-')   printf("%lld\n",a-b);

	return 0;

}