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



int main ()

{	

 	int a,b;

 	scanf("%d", &a);

 	scanf("%d", &b);

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

  	printf("3"); 

 	}

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

 	 printf("3"); 

 	}

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

 	 printf("3"); 

	 }

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

  	printf("3"); 

	}

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

  	printf("2");

	 }

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

  	printf("2");

 	}

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

 	 printf("1");

	 }

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

  	printf("1");

 	}

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



int main ()

{	

 	int a,b;

 	scanf("%d", &a);

 	scanf("%d", &b);

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

  	printf("3"); 

 	}

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

 	 printf("3"); 

 	}

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

 	 printf("3"); 

	 }

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

  	printf("3"); 

	}

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

  	printf("2");

	 }

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

  	printf("2");

 	}

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

 	 printf("1");

	 }

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

  	printf("1");

 	}

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



int main ()

{	

 	int a,b;

 	scanf("%d", &a);

 	scanf("%d", &b);

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

  	printf("3"); 

 	}

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

 	 printf("3"); 

 	}

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

 	 printf("3"); 

	 }

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

  	printf("3"); 

	}

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

  	printf("2");

	 }

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

  	printf("2");

 	}

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

 	 printf("1");

	 }

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

  	printf("1");

 	}

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



int main ()

{	

 	int a,b;

 	scanf("%d", &a);

 	scanf("%d", &b);

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

  	printf("3"); 

 	}

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

 	 printf("3"); 

 	}

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

 	 printf("3"); 

	 }

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

  	printf("3"); 

	}

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

  	printf("2");

	 }

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

  	printf("2");

 	}

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

 	 printf("1");

	 }

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

  	printf("1");

 	}

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



int main (){

	int A, B;

	A=1; 

	A=2; 

	A=3;

	

	B=1; 

	B=2; 

	B=3;

	

	scanf ("%d",&A);

	getchar ();

	scanf ("%d",&B);

	

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

		printf ("3\n");

		

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

		printf ("3\n");

		

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

		printf ("2\n");

		

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

		printf ("2\n");

		

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

		printf ("1\n");

			

		}else {

		printf ("1\n");

	}

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



int main (){

	int A, B;

	A=1; 

	A=2; 

	A=3;

	

	B=1; 

	B=2; 

	B=3;

	

	scanf ("%d",&A);

	getchar ();

	scanf ("%d",&B);

	

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

		printf ("3\n");

		

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

		printf ("3\n");

		

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

		printf ("2\n");

		

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

		printf ("2\n");

		

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

		printf ("1\n");

			

		}else {

		printf ("1\n");

	}

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



int main (){

	int A, B;

	A=1; 

	A=2; 

	A=3;

	

	B=1; 

	B=2; 

	B=3;

	

	scanf ("%d",&A);

	getchar ();

	scanf ("%d",&B);

	

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

		printf ("3\n");

		

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

		printf ("3\n");

		

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

		printf ("2\n");

		

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

		printf ("2\n");

		

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

		printf ("1\n");

			

		}else {

		printf ("1\n");

	}

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



int main (){

	int A, B;

	A=1; 

	A=2; 

	A=3;

	

	B=1; 

	B=2; 

	B=3;

	

	scanf ("%d",&A);

	getchar ();

	scanf ("%d",&B);

	

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

		printf ("3\n");

		

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

		printf ("3\n");

		

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

		printf ("2\n");

		

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

		printf ("2\n");

		

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

		printf ("1\n");

			

		}else {

		printf ("1\n");

	}

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



int main (){

	int A, B;

	A=1; 

	A=2; 

	A=3;

	

	B=1; 

	B=2; 

	B=3;

	

	scanf ("%d",&A);

	getchar ();

	scanf ("%d",&B);

	

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

		printf ("3\n");

		

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

		printf ("3\n");

		

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

		printf ("2\n");

		

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

		printf ("2\n");

		

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

		printf ("1\n");

			

		}else {

		printf ("1\n");

	}

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



int main (){

	int A, B;

	A=1; 

	A=2; 

	A=3;

	

	B=1; 

	B=2; 

	B=3;

	

	scanf ("%d",&A);

	getchar ();

	scanf ("%d",&B);

	

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

		printf ("3\n");

		

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

		printf ("3\n");

		

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

		printf ("2\n");

		

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

		printf ("2\n");

		

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

		printf ("1\n");

			

		}else {

		printf ("1\n");

	}

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



int main (){

	int A, B;

	A=1; 

	A=2; 

	A=3;

	

	B=1; 

	B=2; 

	B=3;

	

	scanf ("%d",&A);

	getchar ();

	scanf ("%d",&B);

	

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

		printf ("3\n");

		

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

		printf ("3\n");

		

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

		printf ("2\n");

		

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

		printf ("2\n");

		

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

		printf ("1\n");

			

		}else {

		printf ("1\n");

	}

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



int main (){

	int A, B;

	A=1; 

	A=2; 

	A=3;

	

	B=1; 

	B=2; 

	B=3;

	

	scanf ("%d",&A);

	getchar ();

	scanf ("%d",&B);

	

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

		printf ("3\n");

		

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

		printf ("3\n");

		

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

		printf ("2\n");

		

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

		printf ("2\n");

		

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

		printf ("1\n");

			

		}else {

		printf ("1\n");

	}

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



int main (){

	int A, B;

	A=1; 

	A=2; 

	A=3;

	

	B=1; 

	B=2; 

	B=3;

	

	scanf ("%d",&A);

	getchar ();

	scanf ("%d",&B);

	

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

		printf ("3\n");

		

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

		printf ("3\n");

		

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

		printf ("2\n");

		

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

		printf ("2\n");

		

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

		printf ("1\n");

			

		}else {

		printf ("1\n");

	}

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



int main (){

	int A, B;

	A=1; 

	A=2; 

	A=3;

	

	B=1; 

	B=2; 

	B=3;

	

	scanf ("%d",&A);

	getchar ();

	scanf ("%d",&B);

	

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

		printf ("3\n");

		

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

		printf ("3\n");

		

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

		printf ("2\n");

		

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

		printf ("2\n");

		

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

		printf ("1\n");

			

		}else {

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



int main (){

	int A, B;

	A=1; 

	A=2; 

	A=3;

	

	B=1; 

	B=2; 

	B=3;

	

	scanf ("%d",&A);

	getchar ();

	scanf ("%d",&B);

	

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

		printf ("3\n");

		

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

		printf ("3\n");

		

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

		printf ("2\n");

		

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

		printf ("2\n");

		

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

		printf ("1\n");

			

		}else {

		printf ("1\n");

	}

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



int main()

{

	int a, b, c;

		scanf("%d", &a);

		getchar();

		scanf("%d", &b);

		

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

			printf("3\n");

		}

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

			printf("3\n");

		}

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

			printf("2\n");

		}

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

			printf("2\n");

		}

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

			printf("1\n");

		}

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

			printf("1\n");

		}



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



int main()

{

	int a, b, c;

		scanf("%d", &a);

		getchar();

		scanf("%d", &b);

		

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

			printf("3\n");

		}

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

			printf("3\n");

		}

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

			printf("2\n");

		}

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

			printf("2\n");

		}

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

			printf("1\n");

		}

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

			printf("1\n");

		}



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



int main()

{

	int a, b, c;

		scanf("%d", &a);

		getchar();

		scanf("%d", &b);

		

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

			printf("3\n");

		}

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

			printf("3\n");

		}

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

			printf("2\n");

		}

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

			printf("2\n");

		}

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

			printf("1\n");

		}

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

			printf("1\n");

		}



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



int main()

{

	int a, b, c;

		scanf("%d", &a);

		getchar();

		scanf("%d", &b);

		

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

			printf("3\n");

		}

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

			printf("3\n");

		}

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

			printf("2\n");

		}

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

			printf("2\n");

		}

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

			printf("1\n");

		}

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

			printf("1\n");

		}



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



int main()

{

	int a, b, c;

		scanf("%d", &a);

		getchar();

		scanf("%d", &b);

		

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

			printf("3\n");

		}

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

			printf("3\n");

		}

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

			printf("2\n");

		}

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

			printf("2\n");

		}

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

			printf("1\n");

		}

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

			printf("1\n");

		}



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



int main()

{

	int a, b, c;

		scanf("%d", &a);

		getchar();

		scanf("%d", &b);

		

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

			printf("3\n");

		}

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

			printf("3\n");

		}

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

			printf("2\n");

		}

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

			printf("2\n");

		}

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

			printf("1\n");

		}

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

			printf("1\n");

		}



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



int main()

{

	int a, b, c;

		scanf("%d", &a);

		getchar();

		scanf("%d", &b);

		

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

			printf("3\n");

		}

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

			printf("3\n");

		}

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

			printf("2\n");

		}

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

			printf("2\n");

		}

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

			printf("1\n");

		}

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

			printf("1\n");

		}



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



int main()

{

	int a, b, c;

		scanf("%d", &a);

		getchar();

		scanf("%d", &b);

		

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

			printf("3\n");

		}

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

			printf("3\n");

		}

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

			printf("2\n");

		}

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

			printf("2\n");

		}

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

			printf("1\n");

		}

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

			printf("1\n");

		}



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



int main()

{

	int a, b, c;

		scanf("%d", &a);

		getchar();

		scanf("%d", &b);

		

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

			printf("3\n");

		}

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

			printf("3\n");

		}

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

			printf("2\n");

		}

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

			printf("2\n");

		}

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

			printf("1\n");

		}

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

			printf("1\n");

		}



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



int main()

{

	int a, b, c;

		scanf("%d", &a);

		getchar();

		scanf("%d", &b);

		

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

			printf("3\n");

		}

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

			printf("3\n");

		}

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

			printf("2\n");

		}

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

			printf("2\n");

		}

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

			printf("1\n");

		}

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

			printf("1\n");

		}



	return 0;	

}