stablegradients/pie-gem5-pairs huggingface dataset:
// 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.380381268562837x):
#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>

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

int main(){



int A,B;

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



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

    printf("1");

}

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

    printf("2");

}

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

    printf("3");

}









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

int main(){



int A,B;

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



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

    printf("1");

}

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

    printf("2");

}

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

    printf("3");

}









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

int main(){



int A,B;

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



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

    printf("1");

}

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

    printf("2");

}

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

    printf("3");

}









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

int main(){



int A,B;

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



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

    printf("1");

}

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

    printf("2");

}

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

    printf("3");

}









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

int main(){



int A,B;

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



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

    printf("1");

}

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

    printf("2");

}

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

    printf("3");

}









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

int main(){



int A,B;

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



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

    printf("1");

}

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

    printf("2");

}

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

    printf("3");

}









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

int main(){



int A,B;

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



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

    printf("1");

}

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

    printf("2");

}

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

    printf("3");

}









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

int main(){



int A,B;

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



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

    printf("1");

}

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

    printf("2");

}

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

    printf("3");

}









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

int main(){



int A,B;

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



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

    printf("1");

}

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

    printf("2");

}

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

    printf("3");

}









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

int main(){



int A,B;

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



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

    printf("1");

}

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

    printf("2");

}

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

    printf("3");

}









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

int main(){



int A,B;

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



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

    printf("1");

}

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

    printf("2");

}

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

    printf("3");

}









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



int main()

{

  int A, B;

  scanf("%d %d", &A, &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



 

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



int main()

{

  int A, B;

  scanf("%d %d", &A, &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  ;



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



int main()

{

  int A, B;

  scanf("%d %d", &A, &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 a, b ;



int main (){

   cin>>a;

   cin>>b;

   cout<< 6-a-b;



}

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



int main()

{

  int A, B;

  scanf("%d %d", &A, &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:
//بسم الله الرحمن الرحيم

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



int main()

{

  int A, B;

  scanf("%d %d", &A, &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 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.2556894223712245x):
#include <stdio.h>



int main()

{

  int A, B;

  scanf("%d %d", &A, &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<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.312079722626238x):
#include <stdio.h>



int main()

{

  int A, B;

  scanf("%d %d", &A, &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 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.320827297913295x):
#include <stdio.h>



int main()

{

  int A, B;

  scanf("%d %d", &A, &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>

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



int main()

{

  int A, B;

  scanf("%d %d", &A, &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() {

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



int main()

{

  int A, B;

  scanf("%d %d", &A, &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.380189034566023x):
#include <stdio.h>



int main()

{

  int A, B;

  scanf("%d %d", &A, &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 <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.313814735161476x):
#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



 

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.3139770757251705x):
#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>



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.314461118690314x):
#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>

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.31633473730616x):
#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:
//بسم الله الرحمن الرحيم

//* 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.383957773581084x):
#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 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.25804553876216x):
#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<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.314461118690314x):
#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;

}