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

using namespace std;



int x, y, z;

int main() {

    x>=1 && x<=3 && y>=1 && y<=3;

    cin >> x >> y;

    z = 6 - (x+y);

    cout << z << endl;

   

}


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



int main()

{

	int A,B;

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

	if((A==2&&B==3)||(A==3&&B==2))

	{

		printf("1");

	}

	if((A==1&&B==2||A==2&&B==1))

	{

		printf("3");

	}

	if((A==3&&B==1||A==1&&B==3))

	{

		printf("2");

	}

	return 0;

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

#include<vector>

#define lli long long int

#include<climits>

#include<unordered_map>

#include<algorithm>

#include<bitset>

#include<map>

#define pb push_back

using namespace std;



int main()

{

   

    int a,b;

    cin>>a>>b;

    vector<bool>arr(4);

    arr[a] = true;

    arr[b] = true;

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

        if(!arr[i])  cout<<i<<endl;

    

}




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



int main()

{

	int A,B;

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

	if((A==2&&B==3)||(A==3&&B==2))

	{

		printf("1");

	}

	if((A==1&&B==2||A==2&&B==1))

	{

		printf("3");

	}

	if((A==3&&B==1||A==1&&B==3))

	{

		printf("2");

	}

	return 0;

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

using namespace std;



int main() {

	// your code goes here

	int b,c;

	cin>>b>>c;

	if(abs(b-c)==2)

	cout<<2;

	else if((b==1||b==2)&&(c==1||c==2))

	cout<<3;

	else

	cout<<1;

}


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



int main()

{

	int A,B;

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

	if((A==2&&B==3)||(A==3&&B==2))

	{

		printf("1");

	}

	if((A==1&&B==2||A==2&&B==1))

	{

		printf("3");

	}

	if((A==3&&B==1||A==1&&B==3))

	{

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



int main()

{

	int A,B;

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

	if((A==2&&B==3)||(A==3&&B==2))

	{

		printf("1");

	}

	if((A==1&&B==2||A==2&&B==1))

	{

		printf("3");

	}

	if((A==3&&B==1||A==1&&B==3))

	{

		printf("2");

	}

	return 0;

}
// Slower C++ solution:




#include <bits/stdc++.h>

#include <ext/pb_ds/assoc_container.hpp>

#include <ext/pb_ds/tree_policy.hpp>

using namespace std;

using namespace __gnu_pbds;

 

#define watch(x) cout<<(#x)<<"="<<(x)<<'\n'

#define mset(d,val) memset(d,val,sizeof(d))

#define setp(x) cout<<fixed<<setprecision(x)

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

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

#define pb push_back

#define mp make_pair

#define F first

#define S second

#define INF ll(1e18)

#define MOD 998244353

#define pqueue priority_queue

#define fbo find_by_order

#define ook order_of_key

typedef long long ll;

typedef pair<ll,ll> ii;

typedef vector<ll> vi;

typedef vector<ii> vii;

typedef long double ld;

typedef tree<ll, null_type, less<ll>, rb_tree_tag, tree_order_statistics_node_update> pbds;

 

#define MAXN 1000000007

 

 

int main() {

	ll a,b;

	cin>>a>>b;

	if ((a+b)==3) {

		cout<<3;

	}

	if ((a+b)==4) {

		cout<<2;

	}

	if ((a+b)==5) {

		cout<<1;

	}

}

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



int main()

{

	int A, B;

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

	printf ("%d", 6 - A - B);

	return 0;

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

#define ll long long



 

using namespace std;

int main()

{

	int a, b; 

	cin >> a >> b;

	cout << 6/(a*b); 

	return 0;

}

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



int main()

{

	int A, B;

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

	printf ("%d", 6 - A - B);

	return 0;

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



using namespace std ;



int main()



{

    int a,b ;



    cin>>a>>b  ;



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

    {

        cout<<"3"<<endl ;

    }

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

    {

        cout<<"2"<<endl ;

    }



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

    {

        cout<<"1"<<endl ;

    }



    return 0;

}

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



int main()

{

	int A, B;

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

	printf ("%d", 6 - A - B);

	return 0;

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

using namespace std;



int a, b ;



int main (){

   cin>>a;

   cin>>b;

   cout<< 6-a-b;



}

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



int main()

{

	int A, B;

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

	printf ("%d", 6 - A - B);

	return 0;

}
// Slower C++ solution:
//بسم الله الرحمن الرحيم

//* In The Name 0f ALLAH *//* The Most Beneficent *//* The Most Merciful *//*

#include<bits/stdc++.h>

using namespace std;

typedef long long ll;

#define el << endl

#define PI 3.141592653589793238

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

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

#define file() freopen("input.txt", "r", stdin); freopen("output.txt", "w", stdout)

ll gcd ( ll a, ll b ) { return __gcd ( a, b ); }

ll lcm ( ll a, ll b ) { return a * ( b / gcd ( a, b ) ); }

int dx[]={0,0,+1,-1,+1,-1,-1,+1};

int dy[]={+1,-1,0,0,+1,-1,+1,-1};

///*......................*//* LET'S BEGIN (-_^) *//*............................///

const int mx=1e5+123;

ll b,ans;



void _case_()

{

    int a,b;

    cin >> a >> b;

    cout << (6-(a+b)) el;

}



int main()

{

    //file();

    optimize();

    //_test_

        _case_();



    return 0;

}



///////////*  N A Y E M  *///////////

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



int main()

{

	int A, B;

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

	printf ("%d", 6 - A - B);

	return 0;

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

#define scan($) scanf("%d",&$)

#define test() int $;scan($);while($--)

using namespace std;

int main()

{

    int a,b;

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

    printf("%d\n",6-(a+b));

    return 0;

}


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



int main()

{

	int A, B;

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

	printf ("%d", 6 - A - B);

	return 0;

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

#include<bits/stdc++.h>

using namespace std;

int main()

{

    int a,b,c;

    cin>>a>>b;

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

        cout<<"3"<<endl;

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

        cout<<"1"<<endl;

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

        cout<<"2"<<endl;

    return 0;

}


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



int main()

{

	int A, B;

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

	printf ("%d", 6 - A - B);

	return 0;

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

using namespace std;



int x, y, z;

int main() {

    x>=1 && x<=3 && y>=1 && y<=3;

    cin >> x >> y;

    z = 6 - (x+y);

    cout << z << endl;

   

}


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



int main()

{

	int A, B;

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

	printf ("%d", 6 - A - B);

	return 0;

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

#include<vector>

#define lli long long int

#include<climits>

#include<unordered_map>

#include<algorithm>

#include<bitset>

#include<map>

#define pb push_back

using namespace std;



int main()

{

   

    int a,b;

    cin>>a>>b;

    vector<bool>arr(4);

    arr[a] = true;

    arr[b] = true;

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

        if(!arr[i])  cout<<i<<endl;

    

}




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



int main()

{

	int A, B;

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

	printf ("%d", 6 - A - B);

	return 0;

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

using namespace std;



int main() {

	// your code goes here

	int b,c;

	cin>>b>>c;

	if(abs(b-c)==2)

	cout<<2;

	else if((b==1||b==2)&&(c==1||c==2))

	cout<<3;

	else

	cout<<1;

}


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



int main()

{

	int A, B;

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

	printf ("%d", 6 - A - B);

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



int main()

{

	int A, B;

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

	printf ("%d", 6 - A - B);

	return 0;

}
// Slower C++ solution:




#include <bits/stdc++.h>

#include <ext/pb_ds/assoc_container.hpp>

#include <ext/pb_ds/tree_policy.hpp>

using namespace std;

using namespace __gnu_pbds;

 

#define watch(x) cout<<(#x)<<"="<<(x)<<'\n'

#define mset(d,val) memset(d,val,sizeof(d))

#define setp(x) cout<<fixed<<setprecision(x)

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

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

#define pb push_back

#define mp make_pair

#define F first

#define S second

#define INF ll(1e18)

#define MOD 998244353

#define pqueue priority_queue

#define fbo find_by_order

#define ook order_of_key

typedef long long ll;

typedef pair<ll,ll> ii;

typedef vector<ll> vi;

typedef vector<ii> vii;

typedef long double ld;

typedef tree<ll, null_type, less<ll>, rb_tree_tag, tree_order_statistics_node_update> pbds;

 

#define MAXN 1000000007

 

 

int main() {

	ll a,b;

	cin>>a>>b;

	if ((a+b)==3) {

		cout<<3;

	}

	if ((a+b)==4) {

		cout<<2;

	}

	if ((a+b)==5) {

		cout<<1;

	}

}

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

int main(){

	int A;

	int B;

	scanf("%d",&A);

	scanf("%d",&B);



	if(A==1&&B==2){

		printf("%d\n",A+B);

	}

	else if(A==2&&B==1){

		printf("%d\n",A+B);	

	}

	else if(A==3&&B==1){

		printf("%d\n",A-B);

	}

	else if(A==2&&B==3){

		printf("%d\n",B-A);

	}

	else if(A==3&&B==2){

		printf("%d\n",A-B);

	}

	else if(A==1&&B==3){

		printf("%d\n",B-A);

	}



	

	return 0;

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

#define ll long long



 

using namespace std;

int main()

{

	int a, b; 

	cin >> a >> b;

	cout << 6/(a*b); 

	return 0;

}

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

int main(){

	int A;

	int B;

	scanf("%d",&A);

	scanf("%d",&B);



	if(A==1&&B==2){

		printf("%d\n",A+B);

	}

	else if(A==2&&B==1){

		printf("%d\n",A+B);	

	}

	else if(A==3&&B==1){

		printf("%d\n",A-B);

	}

	else if(A==2&&B==3){

		printf("%d\n",B-A);

	}

	else if(A==3&&B==2){

		printf("%d\n",A-B);

	}

	else if(A==1&&B==3){

		printf("%d\n",B-A);

	}



	

	return 0;

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



using namespace std ;



int main()



{

    int a,b ;



    cin>>a>>b  ;



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

    {

        cout<<"3"<<endl ;

    }

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

    {

        cout<<"2"<<endl ;

    }



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

    {

        cout<<"1"<<endl ;

    }



    return 0;

}

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

int main(){

	int A;

	int B;

	scanf("%d",&A);

	scanf("%d",&B);



	if(A==1&&B==2){

		printf("%d\n",A+B);

	}

	else if(A==2&&B==1){

		printf("%d\n",A+B);	

	}

	else if(A==3&&B==1){

		printf("%d\n",A-B);

	}

	else if(A==2&&B==3){

		printf("%d\n",B-A);

	}

	else if(A==3&&B==2){

		printf("%d\n",A-B);

	}

	else if(A==1&&B==3){

		printf("%d\n",B-A);

	}



	

	return 0;

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

using namespace std;



int a, b ;



int main (){

   cin>>a;

   cin>>b;

   cout<< 6-a-b;



}

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

int main(){

	int A;

	int B;

	scanf("%d",&A);

	scanf("%d",&B);



	if(A==1&&B==2){

		printf("%d\n",A+B);

	}

	else if(A==2&&B==1){

		printf("%d\n",A+B);	

	}

	else if(A==3&&B==1){

		printf("%d\n",A-B);

	}

	else if(A==2&&B==3){

		printf("%d\n",B-A);

	}

	else if(A==3&&B==2){

		printf("%d\n",A-B);

	}

	else if(A==1&&B==3){

		printf("%d\n",B-A);

	}



	

	return 0;

}
// Slower C++ solution:
//بسم الله الرحمن الرحيم

//* In The Name 0f ALLAH *//* The Most Beneficent *//* The Most Merciful *//*

#include<bits/stdc++.h>

using namespace std;

typedef long long ll;

#define el << endl

#define PI 3.141592653589793238

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

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

#define file() freopen("input.txt", "r", stdin); freopen("output.txt", "w", stdout)

ll gcd ( ll a, ll b ) { return __gcd ( a, b ); }

ll lcm ( ll a, ll b ) { return a * ( b / gcd ( a, b ) ); }

int dx[]={0,0,+1,-1,+1,-1,-1,+1};

int dy[]={+1,-1,0,0,+1,-1,+1,-1};

///*......................*//* LET'S BEGIN (-_^) *//*............................///

const int mx=1e5+123;

ll b,ans;



void _case_()

{

    int a,b;

    cin >> a >> b;

    cout << (6-(a+b)) el;

}



int main()

{

    //file();

    optimize();

    //_test_

        _case_();



    return 0;

}



///////////*  N A Y E M  *///////////

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

int main(){

	int A;

	int B;

	scanf("%d",&A);

	scanf("%d",&B);



	if(A==1&&B==2){

		printf("%d\n",A+B);

	}

	else if(A==2&&B==1){

		printf("%d\n",A+B);	

	}

	else if(A==3&&B==1){

		printf("%d\n",A-B);

	}

	else if(A==2&&B==3){

		printf("%d\n",B-A);

	}

	else if(A==3&&B==2){

		printf("%d\n",A-B);

	}

	else if(A==1&&B==3){

		printf("%d\n",B-A);

	}



	

	return 0;

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

#define scan($) scanf("%d",&$)

#define test() int $;scan($);while($--)

using namespace std;

int main()

{

    int a,b;

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

    printf("%d\n",6-(a+b));

    return 0;

}


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

int main(){

	int A;

	int B;

	scanf("%d",&A);

	scanf("%d",&B);



	if(A==1&&B==2){

		printf("%d\n",A+B);

	}

	else if(A==2&&B==1){

		printf("%d\n",A+B);	

	}

	else if(A==3&&B==1){

		printf("%d\n",A-B);

	}

	else if(A==2&&B==3){

		printf("%d\n",B-A);

	}

	else if(A==3&&B==2){

		printf("%d\n",A-B);

	}

	else if(A==1&&B==3){

		printf("%d\n",B-A);

	}



	

	return 0;

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

#include<bits/stdc++.h>

using namespace std;

int main()

{

    int a,b,c;

    cin>>a>>b;

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

        cout<<"3"<<endl;

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

        cout<<"1"<<endl;

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

        cout<<"2"<<endl;

    return 0;

}


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

int main(){

	int A;

	int B;

	scanf("%d",&A);

	scanf("%d",&B);



	if(A==1&&B==2){

		printf("%d\n",A+B);

	}

	else if(A==2&&B==1){

		printf("%d\n",A+B);	

	}

	else if(A==3&&B==1){

		printf("%d\n",A-B);

	}

	else if(A==2&&B==3){

		printf("%d\n",B-A);

	}

	else if(A==3&&B==2){

		printf("%d\n",A-B);

	}

	else if(A==1&&B==3){

		printf("%d\n",B-A);

	}



	

	return 0;

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

using namespace std;



int x, y, z;

int main() {

    x>=1 && x<=3 && y>=1 && y<=3;

    cin >> x >> y;

    z = 6 - (x+y);

    cout << z << endl;

   

}


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

int main(){

	int A;

	int B;

	scanf("%d",&A);

	scanf("%d",&B);



	if(A==1&&B==2){

		printf("%d\n",A+B);

	}

	else if(A==2&&B==1){

		printf("%d\n",A+B);	

	}

	else if(A==3&&B==1){

		printf("%d\n",A-B);

	}

	else if(A==2&&B==3){

		printf("%d\n",B-A);

	}

	else if(A==3&&B==2){

		printf("%d\n",A-B);

	}

	else if(A==1&&B==3){

		printf("%d\n",B-A);

	}



	

	return 0;

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

#include<vector>

#define lli long long int

#include<climits>

#include<unordered_map>

#include<algorithm>

#include<bitset>

#include<map>

#define pb push_back

using namespace std;



int main()

{

   

    int a,b;

    cin>>a>>b;

    vector<bool>arr(4);

    arr[a] = true;

    arr[b] = true;

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

        if(!arr[i])  cout<<i<<endl;

    

}




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

int main(){

	int A;

	int B;

	scanf("%d",&A);

	scanf("%d",&B);



	if(A==1&&B==2){

		printf("%d\n",A+B);

	}

	else if(A==2&&B==1){

		printf("%d\n",A+B);	

	}

	else if(A==3&&B==1){

		printf("%d\n",A-B);

	}

	else if(A==2&&B==3){

		printf("%d\n",B-A);

	}

	else if(A==3&&B==2){

		printf("%d\n",A-B);

	}

	else if(A==1&&B==3){

		printf("%d\n",B-A);

	}



	

	return 0;

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

using namespace std;



int main() {

	// your code goes here

	int b,c;

	cin>>b>>c;

	if(abs(b-c)==2)

	cout<<2;

	else if((b==1||b==2)&&(c==1||c==2))

	cout<<3;

	else

	cout<<1;

}


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

int main(){

	int A;

	int B;

	scanf("%d",&A);

	scanf("%d",&B);



	if(A==1&&B==2){

		printf("%d\n",A+B);

	}

	else if(A==2&&B==1){

		printf("%d\n",A+B);	

	}

	else if(A==3&&B==1){

		printf("%d\n",A-B);

	}

	else if(A==2&&B==3){

		printf("%d\n",B-A);

	}

	else if(A==3&&B==2){

		printf("%d\n",A-B);

	}

	else if(A==1&&B==3){

		printf("%d\n",B-A);

	}



	

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

int main(){

	int A;

	int B;

	scanf("%d",&A);

	scanf("%d",&B);



	if(A==1&&B==2){

		printf("%d\n",A+B);

	}

	else if(A==2&&B==1){

		printf("%d\n",A+B);	

	}

	else if(A==3&&B==1){

		printf("%d\n",A-B);

	}

	else if(A==2&&B==3){

		printf("%d\n",B-A);

	}

	else if(A==3&&B==2){

		printf("%d\n",A-B);

	}

	else if(A==1&&B==3){

		printf("%d\n",B-A);

	}



	

	return 0;

}
// Slower C++ solution:




#include <bits/stdc++.h>

#include <ext/pb_ds/assoc_container.hpp>

#include <ext/pb_ds/tree_policy.hpp>

using namespace std;

using namespace __gnu_pbds;

 

#define watch(x) cout<<(#x)<<"="<<(x)<<'\n'

#define mset(d,val) memset(d,val,sizeof(d))

#define setp(x) cout<<fixed<<setprecision(x)

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

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

#define pb push_back

#define mp make_pair

#define F first

#define S second

#define INF ll(1e18)

#define MOD 998244353

#define pqueue priority_queue

#define fbo find_by_order

#define ook order_of_key

typedef long long ll;

typedef pair<ll,ll> ii;

typedef vector<ll> vi;

typedef vector<ii> vii;

typedef long double ld;

typedef tree<ll, null_type, less<ll>, rb_tree_tag, tree_order_statistics_node_update> pbds;

 

#define MAXN 1000000007

 

 

int main() {

	ll a,b;

	cin>>a>>b;

	if ((a+b)==3) {

		cout<<3;

	}

	if ((a+b)==4) {

		cout<<2;

	}

	if ((a+b)==5) {

		cout<<1;

	}

}

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

int main()

{

	int A,B;

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

	printf("%d\n", 6 - A - B);

	return 0 ;

	

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

#define ll long long



 

using namespace std;

int main()

{

	int a, b; 

	cin >> a >> b;

	cout << 6/(a*b); 

	return 0;

}

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

int main()

{

	int A,B;

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

	printf("%d\n", 6 - A - B);

	return 0 ;

	

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



using namespace std ;



int main()



{

    int a,b ;



    cin>>a>>b  ;



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

    {

        cout<<"3"<<endl ;

    }

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

    {

        cout<<"2"<<endl ;

    }



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

    {

        cout<<"1"<<endl ;

    }



    return 0;

}

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

int main()

{

	int A,B;

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

	printf("%d\n", 6 - A - B);

	return 0 ;

	

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

using namespace std;



int a, b ;



int main (){

   cin>>a;

   cin>>b;

   cout<< 6-a-b;



}

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

int main()

{

	int A,B;

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

	printf("%d\n", 6 - A - B);

	return 0 ;

	

}
// Slower C++ solution:
//بسم الله الرحمن الرحيم

//* In The Name 0f ALLAH *//* The Most Beneficent *//* The Most Merciful *//*

#include<bits/stdc++.h>

using namespace std;

typedef long long ll;

#define el << endl

#define PI 3.141592653589793238

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

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

#define file() freopen("input.txt", "r", stdin); freopen("output.txt", "w", stdout)

ll gcd ( ll a, ll b ) { return __gcd ( a, b ); }

ll lcm ( ll a, ll b ) { return a * ( b / gcd ( a, b ) ); }

int dx[]={0,0,+1,-1,+1,-1,-1,+1};

int dy[]={+1,-1,0,0,+1,-1,+1,-1};

///*......................*//* LET'S BEGIN (-_^) *//*............................///

const int mx=1e5+123;

ll b,ans;



void _case_()

{

    int a,b;

    cin >> a >> b;

    cout << (6-(a+b)) el;

}



int main()

{

    //file();

    optimize();

    //_test_

        _case_();



    return 0;

}



///////////*  N A Y E M  *///////////

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

int main()

{

	int A,B;

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

	printf("%d\n", 6 - A - B);

	return 0 ;

	

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

#define scan($) scanf("%d",&$)

#define test() int $;scan($);while($--)

using namespace std;

int main()

{

    int a,b;

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

    printf("%d\n",6-(a+b));

    return 0;

}


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

int main()

{

	int A,B;

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

	printf("%d\n", 6 - A - B);

	return 0 ;

	

}