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

using namespace std;

int main()

{

	int a,b,c;

	cin >>a>>b;

if((a==1||a==2) && (b==2||b==1))

cout<<3<<endl;

else if((a==1||a==3) && (b==3||b==1))

cout<<2<<endl;

else

cout<<1<<endl;

}  

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



int main(){

	int A, B;

	scanf("%d %d", &A, &B);

    if(A == 1){

    	if(B == 2){

    		printf("%d",3);

		}

		else{

			printf("%d",2);

		}

	}

	else if(A == 2){

		if(B == 1){

			printf("%d",3);

		}

		else{

			printf("%d",1);

		}

	}

	else if(A == 3){

		if(B == 2){

			printf("%d",1);

		}

		else{

			printf("%d",2);

		}

	}

	return 0;

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

using namespace std;



int a,b;

int main(){

    cin>>a>>b;

    cout<<6-a-b<<endl;

}

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



int main(){

	int A, B;

	scanf("%d %d", &A, &B);

    if(A == 1){

    	if(B == 2){

    		printf("%d",3);

		}

		else{

			printf("%d",2);

		}

	}

	else if(A == 2){

		if(B == 1){

			printf("%d",3);

		}

		else{

			printf("%d",1);

		}

	}

	else if(A == 3){

		if(B == 2){

			printf("%d",1);

		}

		else{

			printf("%d",2);

		}

	}

	return 0;

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

#define ll long long int

#define vll vector<pair<ll, ll> >

#define vl vector<ll>

#define vi vector<int>

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

const ll mod = 1e9 + 7;

const ll inf = LLONG_MAX;

using namespace std;



ll power_mod(ll x, ll y, ll p)

{

	ll ans = 1;

	x = x%p;

	if(x==0)

	return p;



	while(y>0)

	{

		if(y&1)

		{

			ans = (ans*x)%p;

		}

		y = y>>1;

		x = (x*x)%p;

	}

	return ans;

} 



int main()

{

	ios_base::sync_with_stdio(false);

	cin.tie(0);

	ll i,j,k,l,m,n;

	

	ll a,b,c;

	cin>>a>>b;

	cout<<6-a-b;

	return 0;

}


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



int main(){

	int A, B;

	scanf("%d %d", &A, &B);

    if(A == 1){

    	if(B == 2){

    		printf("%d",3);

		}

		else{

			printf("%d",2);

		}

	}

	else if(A == 2){

		if(B == 1){

			printf("%d",3);

		}

		else{

			printf("%d",1);

		}

	}

	else if(A == 3){

		if(B == 2){

			printf("%d",1);

		}

		else{

			printf("%d",2);

		}

	}

	return 0;

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

using namespace std;



int main() {

	int a,b;

	cin>>a>>b;

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

	    if(i!=a && i!=b){

	        cout<<i;

	        return 0;

	    }

	}

	return 0;

}


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



int main(){

	int A, B;

	scanf("%d %d", &A, &B);

    if(A == 1){

    	if(B == 2){

    		printf("%d",3);

		}

		else{

			printf("%d",2);

		}

	}

	else if(A == 2){

		if(B == 1){

			printf("%d",3);

		}

		else{

			printf("%d",1);

		}

	}

	else if(A == 3){

		if(B == 2){

			printf("%d",1);

		}

		else{

			printf("%d",2);

		}

	}

	return 0;

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



using namespace std;

#define ll long long int

#define f(i,n) for(auto i=0;i<n;i++)

#define fs(i,a,b,c) for(auto i=a;i!=b;i+=c)

#define fl(i,x) for(auto i : x)

#define nl cout<<"\n";

#define vi vector<int>

#define pb push_back

#define pr pair<ll, ll>



class triplet{

    ll f,s,t;

};



int main(){

   ll A,B,C;

   cin>>A>>B;

   cout<<6-A-B;

}

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



int main(){

	int A, B;

	scanf("%d %d", &A, &B);

    if(A == 1){

    	if(B == 2){

    		printf("%d",3);

		}

		else{

			printf("%d",2);

		}

	}

	else if(A == 2){

		if(B == 1){

			printf("%d",3);

		}

		else{

			printf("%d",1);

		}

	}

	else if(A == 3){

		if(B == 2){

			printf("%d",1);

		}

		else{

			printf("%d",2);

		}

	}

	return 0;

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

using namespace std;



int main() {

    int a,b;

    cin>>a>>b;

    if((a==1 && b==2)|| (a==2 &&b==1))

        cout<<"3";

    else if((a==1 && b==3)|| (a==3 &&b==1))

        cout<<"2";

    else

        cout<<"1";

}


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



int main(){

	int A, B;

	scanf("%d %d", &A, &B);

    if(A == 1){

    	if(B == 2){

    		printf("%d",3);

		}

		else{

			printf("%d",2);

		}

	}

	else if(A == 2){

		if(B == 1){

			printf("%d",3);

		}

		else{

			printf("%d",1);

		}

	}

	else if(A == 3){

		if(B == 2){

			printf("%d",1);

		}

		else{

			printf("%d",2);

		}

	}

	return 0;

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

#include <cstdio>

#include <cstring>

#include <cmath>

#include <cstring>

#include <chrono>

#include <complex>

#define endl "\n"

#define ll long long int

#define vi vector<int>

#define vll vector<ll>

#define vvi vector < vi >

#define pii pair<int,int>

#define pll pair<long long, long long>

#define mod 1000000007

#define inf 1000000000000000001;

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

#define mp(x,y) make_pair(x,y)

#define mem(a,val) memset(a,val,sizeof(a))

#define eb emplace_back

#define f first

#define s second



using namespace std;

int a,b;



int main(){

    cin>>a>>b;

    if(a+b==3){

        cout<<3;

    }

    else if(a+b==4){

        cout<<2;

    }

    else{

        cout<<1;

    }

}


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



int main(){

	int A, B;

	scanf("%d %d", &A, &B);

    if(A == 1){

    	if(B == 2){

    		printf("%d",3);

		}

		else{

			printf("%d",2);

		}

	}

	else if(A == 2){

		if(B == 1){

			printf("%d",3);

		}

		else{

			printf("%d",1);

		}

	}

	else if(A == 3){

		if(B == 2){

			printf("%d",1);

		}

		else{

			printf("%d",2);

		}

	}

	return 0;

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

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

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

 

using namespace std;

 

int main(){

	int a, b; cin >> a >> b;



	int ans;

	

	fore(i,1,4) { if (i!=a && i!=b) ans=i; }

	

	cout << ans;

	

	return 0;

}

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

int main()

{

	int angka1, angka2;

	scanf("%d %d", &angka1, &angka2);

	if (angka1==1 && angka2==2) printf("3\n");

	else if (angka1==3 && angka2==1) printf("2\n");

	else if (angka1==2 && angka2==3) printf("1\n");

	else if (angka1==1 && angka2==3) printf("2\n");

	else if (angka1==2 && angka2==1) printf("3\n");

	else if (angka1==3 && angka2==2) printf("1\n");

	return 0;

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

using namespace std;

int main()

{

	int a,b,c;

	cin >>a>>b;

if((a==1||a==2) && (b==2||b==1))

cout<<3<<endl;

else if((a==1||a==3) && (b==3||b==1))

cout<<2<<endl;

else

cout<<1<<endl;

}  

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

int main()

{

	int angka1, angka2;

	scanf("%d %d", &angka1, &angka2);

	if (angka1==1 && angka2==2) printf("3\n");

	else if (angka1==3 && angka2==1) printf("2\n");

	else if (angka1==2 && angka2==3) printf("1\n");

	else if (angka1==1 && angka2==3) printf("2\n");

	else if (angka1==2 && angka2==1) printf("3\n");

	else if (angka1==3 && angka2==2) printf("1\n");

	return 0;

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

using namespace std;



int a,b;

int main(){

    cin>>a>>b;

    cout<<6-a-b<<endl;

}

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

int main()

{

	int angka1, angka2;

	scanf("%d %d", &angka1, &angka2);

	if (angka1==1 && angka2==2) printf("3\n");

	else if (angka1==3 && angka2==1) printf("2\n");

	else if (angka1==2 && angka2==3) printf("1\n");

	else if (angka1==1 && angka2==3) printf("2\n");

	else if (angka1==2 && angka2==1) printf("3\n");

	else if (angka1==3 && angka2==2) printf("1\n");

	return 0;

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

#define ll long long int

#define vll vector<pair<ll, ll> >

#define vl vector<ll>

#define vi vector<int>

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

const ll mod = 1e9 + 7;

const ll inf = LLONG_MAX;

using namespace std;



ll power_mod(ll x, ll y, ll p)

{

	ll ans = 1;

	x = x%p;

	if(x==0)

	return p;



	while(y>0)

	{

		if(y&1)

		{

			ans = (ans*x)%p;

		}

		y = y>>1;

		x = (x*x)%p;

	}

	return ans;

} 



int main()

{

	ios_base::sync_with_stdio(false);

	cin.tie(0);

	ll i,j,k,l,m,n;

	

	ll a,b,c;

	cin>>a>>b;

	cout<<6-a-b;

	return 0;

}


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

int main()

{

	int angka1, angka2;

	scanf("%d %d", &angka1, &angka2);

	if (angka1==1 && angka2==2) printf("3\n");

	else if (angka1==3 && angka2==1) printf("2\n");

	else if (angka1==2 && angka2==3) printf("1\n");

	else if (angka1==1 && angka2==3) printf("2\n");

	else if (angka1==2 && angka2==1) printf("3\n");

	else if (angka1==3 && angka2==2) printf("1\n");

	return 0;

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

using namespace std;



int main() {

	int a,b;

	cin>>a>>b;

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

	    if(i!=a && i!=b){

	        cout<<i;

	        return 0;

	    }

	}

	return 0;

}


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

int main()

{

	int angka1, angka2;

	scanf("%d %d", &angka1, &angka2);

	if (angka1==1 && angka2==2) printf("3\n");

	else if (angka1==3 && angka2==1) printf("2\n");

	else if (angka1==2 && angka2==3) printf("1\n");

	else if (angka1==1 && angka2==3) printf("2\n");

	else if (angka1==2 && angka2==1) printf("3\n");

	else if (angka1==3 && angka2==2) printf("1\n");

	return 0;

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



using namespace std;

#define ll long long int

#define f(i,n) for(auto i=0;i<n;i++)

#define fs(i,a,b,c) for(auto i=a;i!=b;i+=c)

#define fl(i,x) for(auto i : x)

#define nl cout<<"\n";

#define vi vector<int>

#define pb push_back

#define pr pair<ll, ll>



class triplet{

    ll f,s,t;

};



int main(){

   ll A,B,C;

   cin>>A>>B;

   cout<<6-A-B;

}

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

int main()

{

	int angka1, angka2;

	scanf("%d %d", &angka1, &angka2);

	if (angka1==1 && angka2==2) printf("3\n");

	else if (angka1==3 && angka2==1) printf("2\n");

	else if (angka1==2 && angka2==3) printf("1\n");

	else if (angka1==1 && angka2==3) printf("2\n");

	else if (angka1==2 && angka2==1) printf("3\n");

	else if (angka1==3 && angka2==2) printf("1\n");

	return 0;

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

using namespace std;



int main() {

    int a,b;

    cin>>a>>b;

    if((a==1 && b==2)|| (a==2 &&b==1))

        cout<<"3";

    else if((a==1 && b==3)|| (a==3 &&b==1))

        cout<<"2";

    else

        cout<<"1";

}


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

int main()

{

	int angka1, angka2;

	scanf("%d %d", &angka1, &angka2);

	if (angka1==1 && angka2==2) printf("3\n");

	else if (angka1==3 && angka2==1) printf("2\n");

	else if (angka1==2 && angka2==3) printf("1\n");

	else if (angka1==1 && angka2==3) printf("2\n");

	else if (angka1==2 && angka2==1) printf("3\n");

	else if (angka1==3 && angka2==2) printf("1\n");

	return 0;

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

#include <cstdio>

#include <cstring>

#include <cmath>

#include <cstring>

#include <chrono>

#include <complex>

#define endl "\n"

#define ll long long int

#define vi vector<int>

#define vll vector<ll>

#define vvi vector < vi >

#define pii pair<int,int>

#define pll pair<long long, long long>

#define mod 1000000007

#define inf 1000000000000000001;

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

#define mp(x,y) make_pair(x,y)

#define mem(a,val) memset(a,val,sizeof(a))

#define eb emplace_back

#define f first

#define s second



using namespace std;

int a,b;



int main(){

    cin>>a>>b;

    if(a+b==3){

        cout<<3;

    }

    else if(a+b==4){

        cout<<2;

    }

    else{

        cout<<1;

    }

}


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

int main()

{

	int angka1, angka2;

	scanf("%d %d", &angka1, &angka2);

	if (angka1==1 && angka2==2) printf("3\n");

	else if (angka1==3 && angka2==1) printf("2\n");

	else if (angka1==2 && angka2==3) printf("1\n");

	else if (angka1==1 && angka2==3) printf("2\n");

	else if (angka1==2 && angka2==1) printf("3\n");

	else if (angka1==3 && angka2==2) printf("1\n");

	return 0;

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

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

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

 

using namespace std;

 

int main(){

	int a, b; cin >> a >> b;



	int ans;

	

	fore(i,1,4) { if (i!=a && i!=b) ans=i; }

	

	cout << ans;

	

	return 0;

}

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

int main (){

	

	int a,b,c;

	

	scanf("%d",&a);

	scanf("%d",&b);

	

	if(a == 1 && b == 2){

		printf("3");

	}

	

	else if(a == 2 && b == 1){

		printf("3");

	}

	

	else if(a == 2 && b == 3){

		printf("1");

	}

	

	else if(a == 3 && b == 2){

		printf("1");

	}

	

	else {

		printf("2");

	}

	

	return 0;

	

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

using namespace std;

int main()

{

	int a,b,c;

	cin >>a>>b;

if((a==1||a==2) && (b==2||b==1))

cout<<3<<endl;

else if((a==1||a==3) && (b==3||b==1))

cout<<2<<endl;

else

cout<<1<<endl;

}  

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

int main (){

	

	int a,b,c;

	

	scanf("%d",&a);

	scanf("%d",&b);

	

	if(a == 1 && b == 2){

		printf("3");

	}

	

	else if(a == 2 && b == 1){

		printf("3");

	}

	

	else if(a == 2 && b == 3){

		printf("1");

	}

	

	else if(a == 3 && b == 2){

		printf("1");

	}

	

	else {

		printf("2");

	}

	

	return 0;

	

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

using namespace std;



int a,b;

int main(){

    cin>>a>>b;

    cout<<6-a-b<<endl;

}

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

int main (){

	

	int a,b,c;

	

	scanf("%d",&a);

	scanf("%d",&b);

	

	if(a == 1 && b == 2){

		printf("3");

	}

	

	else if(a == 2 && b == 1){

		printf("3");

	}

	

	else if(a == 2 && b == 3){

		printf("1");

	}

	

	else if(a == 3 && b == 2){

		printf("1");

	}

	

	else {

		printf("2");

	}

	

	return 0;

	

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

#define ll long long int

#define vll vector<pair<ll, ll> >

#define vl vector<ll>

#define vi vector<int>

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

const ll mod = 1e9 + 7;

const ll inf = LLONG_MAX;

using namespace std;



ll power_mod(ll x, ll y, ll p)

{

	ll ans = 1;

	x = x%p;

	if(x==0)

	return p;



	while(y>0)

	{

		if(y&1)

		{

			ans = (ans*x)%p;

		}

		y = y>>1;

		x = (x*x)%p;

	}

	return ans;

} 



int main()

{

	ios_base::sync_with_stdio(false);

	cin.tie(0);

	ll i,j,k,l,m,n;

	

	ll a,b,c;

	cin>>a>>b;

	cout<<6-a-b;

	return 0;

}


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

int main (){

	

	int a,b,c;

	

	scanf("%d",&a);

	scanf("%d",&b);

	

	if(a == 1 && b == 2){

		printf("3");

	}

	

	else if(a == 2 && b == 1){

		printf("3");

	}

	

	else if(a == 2 && b == 3){

		printf("1");

	}

	

	else if(a == 3 && b == 2){

		printf("1");

	}

	

	else {

		printf("2");

	}

	

	return 0;

	

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

using namespace std;



int main() {

	int a,b;

	cin>>a>>b;

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

	    if(i!=a && i!=b){

	        cout<<i;

	        return 0;

	    }

	}

	return 0;

}


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

int main (){

	

	int a,b,c;

	

	scanf("%d",&a);

	scanf("%d",&b);

	

	if(a == 1 && b == 2){

		printf("3");

	}

	

	else if(a == 2 && b == 1){

		printf("3");

	}

	

	else if(a == 2 && b == 3){

		printf("1");

	}

	

	else if(a == 3 && b == 2){

		printf("1");

	}

	

	else {

		printf("2");

	}

	

	return 0;

	

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



using namespace std;

#define ll long long int

#define f(i,n) for(auto i=0;i<n;i++)

#define fs(i,a,b,c) for(auto i=a;i!=b;i+=c)

#define fl(i,x) for(auto i : x)

#define nl cout<<"\n";

#define vi vector<int>

#define pb push_back

#define pr pair<ll, ll>



class triplet{

    ll f,s,t;

};



int main(){

   ll A,B,C;

   cin>>A>>B;

   cout<<6-A-B;

}

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

int main (){

	

	int a,b,c;

	

	scanf("%d",&a);

	scanf("%d",&b);

	

	if(a == 1 && b == 2){

		printf("3");

	}

	

	else if(a == 2 && b == 1){

		printf("3");

	}

	

	else if(a == 2 && b == 3){

		printf("1");

	}

	

	else if(a == 3 && b == 2){

		printf("1");

	}

	

	else {

		printf("2");

	}

	

	return 0;

	

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

using namespace std;



int main() {

    int a,b;

    cin>>a>>b;

    if((a==1 && b==2)|| (a==2 &&b==1))

        cout<<"3";

    else if((a==1 && b==3)|| (a==3 &&b==1))

        cout<<"2";

    else

        cout<<"1";

}


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

int main (){

	

	int a,b,c;

	

	scanf("%d",&a);

	scanf("%d",&b);

	

	if(a == 1 && b == 2){

		printf("3");

	}

	

	else if(a == 2 && b == 1){

		printf("3");

	}

	

	else if(a == 2 && b == 3){

		printf("1");

	}

	

	else if(a == 3 && b == 2){

		printf("1");

	}

	

	else {

		printf("2");

	}

	

	return 0;

	

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

#include <cstdio>

#include <cstring>

#include <cmath>

#include <cstring>

#include <chrono>

#include <complex>

#define endl "\n"

#define ll long long int

#define vi vector<int>

#define vll vector<ll>

#define vvi vector < vi >

#define pii pair<int,int>

#define pll pair<long long, long long>

#define mod 1000000007

#define inf 1000000000000000001;

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

#define mp(x,y) make_pair(x,y)

#define mem(a,val) memset(a,val,sizeof(a))

#define eb emplace_back

#define f first

#define s second



using namespace std;

int a,b;



int main(){

    cin>>a>>b;

    if(a+b==3){

        cout<<3;

    }

    else if(a+b==4){

        cout<<2;

    }

    else{

        cout<<1;

    }

}


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

int main (){

	

	int a,b,c;

	

	scanf("%d",&a);

	scanf("%d",&b);

	

	if(a == 1 && b == 2){

		printf("3");

	}

	

	else if(a == 2 && b == 1){

		printf("3");

	}

	

	else if(a == 2 && b == 3){

		printf("1");

	}

	

	else if(a == 3 && b == 2){

		printf("1");

	}

	

	else {

		printf("2");

	}

	

	return 0;

	

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

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

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

 

using namespace std;

 

int main(){

	int a, b; cin >> a >> b;



	int ans;

	

	fore(i,1,4) { if (i!=a && i!=b) ans=i; }

	

	cout << ans;

	

	return 0;

}

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

int main()

{

	int x,y;

	scanf("%d %d",&x,&y);

	if(x==1 && y==2 || x==2 && y==1){

		printf("3");

	}

	if(x==2 && y==3 || x==3 && y==2){

		printf("1");

	}

	if(x==1 && y==3 || x==3 && y==1){

		printf("2");

	}

	return 0;

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

using namespace std;

int main()

{

	int a,b,c;

	cin >>a>>b;

if((a==1||a==2) && (b==2||b==1))

cout<<3<<endl;

else if((a==1||a==3) && (b==3||b==1))

cout<<2<<endl;

else

cout<<1<<endl;

}  

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

int main()

{

	int x,y;

	scanf("%d %d",&x,&y);

	if(x==1 && y==2 || x==2 && y==1){

		printf("3");

	}

	if(x==2 && y==3 || x==3 && y==2){

		printf("1");

	}

	if(x==1 && y==3 || x==3 && y==1){

		printf("2");

	}

	return 0;

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

using namespace std;



int a,b;

int main(){

    cin>>a>>b;

    cout<<6-a-b<<endl;

}

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

int main()

{

	int x,y;

	scanf("%d %d",&x,&y);

	if(x==1 && y==2 || x==2 && y==1){

		printf("3");

	}

	if(x==2 && y==3 || x==3 && y==2){

		printf("1");

	}

	if(x==1 && y==3 || x==3 && y==1){

		printf("2");

	}

	return 0;

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

#define ll long long int

#define vll vector<pair<ll, ll> >

#define vl vector<ll>

#define vi vector<int>

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

const ll mod = 1e9 + 7;

const ll inf = LLONG_MAX;

using namespace std;



ll power_mod(ll x, ll y, ll p)

{

	ll ans = 1;

	x = x%p;

	if(x==0)

	return p;



	while(y>0)

	{

		if(y&1)

		{

			ans = (ans*x)%p;

		}

		y = y>>1;

		x = (x*x)%p;

	}

	return ans;

} 



int main()

{

	ios_base::sync_with_stdio(false);

	cin.tie(0);

	ll i,j,k,l,m,n;

	

	ll a,b,c;

	cin>>a>>b;

	cout<<6-a-b;

	return 0;

}


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

int main()

{

	int x,y;

	scanf("%d %d",&x,&y);

	if(x==1 && y==2 || x==2 && y==1){

		printf("3");

	}

	if(x==2 && y==3 || x==3 && y==2){

		printf("1");

	}

	if(x==1 && y==3 || x==3 && y==1){

		printf("2");

	}

	return 0;

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

using namespace std;



int main() {

	int a,b;

	cin>>a>>b;

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

	    if(i!=a && i!=b){

	        cout<<i;

	        return 0;

	    }

	}

	return 0;

}


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

int main()

{

	int x,y;

	scanf("%d %d",&x,&y);

	if(x==1 && y==2 || x==2 && y==1){

		printf("3");

	}

	if(x==2 && y==3 || x==3 && y==2){

		printf("1");

	}

	if(x==1 && y==3 || x==3 && y==1){

		printf("2");

	}

	return 0;

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



using namespace std;

#define ll long long int

#define f(i,n) for(auto i=0;i<n;i++)

#define fs(i,a,b,c) for(auto i=a;i!=b;i+=c)

#define fl(i,x) for(auto i : x)

#define nl cout<<"\n";

#define vi vector<int>

#define pb push_back

#define pr pair<ll, ll>



class triplet{

    ll f,s,t;

};



int main(){

   ll A,B,C;

   cin>>A>>B;

   cout<<6-A-B;

}

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

int main()

{

	int x,y;

	scanf("%d %d",&x,&y);

	if(x==1 && y==2 || x==2 && y==1){

		printf("3");

	}

	if(x==2 && y==3 || x==3 && y==2){

		printf("1");

	}

	if(x==1 && y==3 || x==3 && y==1){

		printf("2");

	}

	return 0;

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

using namespace std;



int main() {

    int a,b;

    cin>>a>>b;

    if((a==1 && b==2)|| (a==2 &&b==1))

        cout<<"3";

    else if((a==1 && b==3)|| (a==3 &&b==1))

        cout<<"2";

    else

        cout<<"1";

}


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

int main()

{

	int x,y;

	scanf("%d %d",&x,&y);

	if(x==1 && y==2 || x==2 && y==1){

		printf("3");

	}

	if(x==2 && y==3 || x==3 && y==2){

		printf("1");

	}

	if(x==1 && y==3 || x==3 && y==1){

		printf("2");

	}

	return 0;

}