stablegradients/pie-gem5-pairs huggingface dataset:
// Slower C++ solution:
// Optimise

#include <bits/stdc++.h>

using namespace std;



#ifdef LOCAL

#include "/home/shahraaz/bin/debug.h"

#else

#define db(...)

#endif



using ll = long long;

#define f first

#define s second

#define pb push_back

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



const int NAX = 2e5 + 5, MOD = 1000000007;



class Solution

{

private:

public:

    Solution() {}

    ~Solution() {}

    void solveCase()

    {

        int a, b;

        cin >> a >> b;

        cout << 6 - a - b << '\n';

    }

};



int32_t main()

{

#ifndef LOCAL

    ios_base::sync_with_stdio(0);

    cin.tie(0);

#endif

    int t = 1;

    // cin >> t;

    Solution mySolver;

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

    {

        mySolver.solveCase();

#ifdef LOCAL

        cerr << "Case #" << i << ": Time " << chrono::duration<double>(chrono::steady_clock::now() - TimeStart).count() << " s.\n";

        TimeStart = chrono::steady_clock::now();

#endif

    }

    return 0;

}


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



int main()

{

    int A, B;

    scanf("%d", &A);

    scanf("%d", &B);

    

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

        printf("3");

    }

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

        printf("2");

    }

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

        printf("1");

    }



    return 0;



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

using namespace std;

int main()

{

    int a,b,c;

    cin >> a >> b;

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

        cout << "3" << endl;

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

        cout << "3" << endl;

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

        cout << "1" << endl;

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

        cout << "1" << endl;

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

        cout << "2" << endl;

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

        cout << "2" << endl;

    return 0;



}


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



int main()

{

    int A, B;

    scanf("%d", &A);

    scanf("%d", &B);

    

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

        printf("3");

    }

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

        printf("2");

    }

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

        printf("1");

    }



    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==2&&b==3||a==3&&b==2)

        cout<<1<<endl;

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

        cout<<2<<endl;

    else

    return 0;

}


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



int main()

{

    int A, B;

    scanf("%d", &A);

    scanf("%d", &B);

    

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

        printf("3");

    }

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

        printf("2");

    }

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

        printf("1");

    }



    return 0;



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

using namespace std;

//h3h3

int a,b;

int main() {

cin>>a>>b;

cout<<6-a-b;

}

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



int main()

{

    int A, B;

    scanf("%d", &A);

    scanf("%d", &B);

    

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

        printf("3");

    }

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

        printf("2");

    }

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

        printf("1");

    }



    return 0;



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

using namespace std;







int main()

{

int a,b;

cin >> a >> b;

int x= a+b;

if(x==3){

    cout << "3";

}else if (x==4){

    cout << "2";

}else if (x==5){

    cout << "1";

}

}




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



int main()

{

    int A, B;

    scanf("%d", &A);

    scanf("%d", &B);

    

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

        printf("3");

    }

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

        printf("2");

    }

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

        printf("1");

    }



    return 0;



}
// Slower C++ solution:
/// --- In the name of ALLAH --- ///





#include <cmath>

#include<bits/stdc++.h>

using namespace std;





typedef long long              ll;

typedef vector<int>            vi;

typedef vector<ll>             vl;

typedef vector<vi>             vvi;

typedef vector<vl>             vvl;

typedef pair<int,int>          pii;

typedef pair<double, double>   pdd;

typedef pair<ll, ll>           pll;

typedef vector<pii>            vii;

typedef vector<pll>            vll;

typedef double                 dl;



#define endl                   '\n'

#define PB                     push_back

#define F                      first

#define S                      second

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

#define rall(a)                (a).rbegin(),(a).rend()

#define sz(x)                  (ll)x.size()

#define wt                     ll t; cin>>t; while(t--)

#define input(a,n)             for(int i=0;i<n;i++) cin>>a[i];



const double PI = acos(-1);

const double eps = 1e-9;

const int inf = 2000000000;

const ll infLL = 9000000000000000000;





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

#define sqr(a) ((a) * (a))

#define mod 10000007

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

#define fraction() cout.unsetf(ios::floatfield); cout.precision(10); cout.setf(ios::fixed,ios::floatfield);

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



#define dbg(args...) do {cerr << #args << " : "; faltu(args); } while(0)

void faltu () {            cerr << endl;}

template < typename T, typename ... hello>void faltu( T arg, const hello &... rest) {cerr << arg << ' ';faltu(rest...);}



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

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





const ll mx=1e9;



















int main()

{

    optimize();

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



int main()

{

    int A, B;

    scanf("%d", &A);

    scanf("%d", &B);

    

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

        printf("3");

    }

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

        printf("2");

    }

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

        printf("1");

    }



    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";

   }

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

   {

       cout<<"2";

   }

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

   {

       cout<<"1";

   }

}


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



int main()

{

    int A, B;

    scanf("%d", &A);

    scanf("%d", &B);

    

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

        printf("3");

    }

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

        printf("2");

    }

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

        printf("1");

    }



    return 0;



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

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



int main()

{

    int A, B;

    scanf("%d", &A);

    scanf("%d", &B);

    

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

        printf("3");

    }

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

        printf("2");

    }

    if ((A == 2 && B == 3) || (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.241749539784238x):
#include<stdio.h>



int main(){



int a1, a2;

scanf("%d %d", &a1, &a2);

if ((a1==1&&a2==2)||(a1==2&&a2==1))printf("%d\n", 3);

else if ((a1==1&&a2==3)||(a1==3&&a2==1))printf("%d\n", 2);

else if ((a1==2&&a2==3)||(a1==3&&a2==2))printf("%d\n", 1);



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



int main(){



int a1, a2;

scanf("%d %d", &a1, &a2);

if ((a1==1&&a2==2)||(a1==2&&a2==1))printf("%d\n", 3);

else if ((a1==1&&a2==3)||(a1==3&&a2==1))printf("%d\n", 2);

else if ((a1==2&&a2==3)||(a1==3&&a2==2))printf("%d\n", 1);



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



int main(){



int a1, a2;

scanf("%d %d", &a1, &a2);

if ((a1==1&&a2==2)||(a1==2&&a2==1))printf("%d\n", 3);

else if ((a1==1&&a2==3)||(a1==3&&a2==1))printf("%d\n", 2);

else if ((a1==2&&a2==3)||(a1==3&&a2==2))printf("%d\n", 1);



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



int main(){



int a1, a2;

scanf("%d %d", &a1, &a2);

if ((a1==1&&a2==2)||(a1==2&&a2==1))printf("%d\n", 3);

else if ((a1==1&&a2==3)||(a1==3&&a2==1))printf("%d\n", 2);

else if ((a1==2&&a2==3)||(a1==3&&a2==2))printf("%d\n", 1);



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



int main(){



int a1, a2;

scanf("%d %d", &a1, &a2);

if ((a1==1&&a2==2)||(a1==2&&a2==1))printf("%d\n", 3);

else if ((a1==1&&a2==3)||(a1==3&&a2==1))printf("%d\n", 2);

else if ((a1==2&&a2==3)||(a1==3&&a2==2))printf("%d\n", 1);



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



int main(){



int a1, a2;

scanf("%d %d", &a1, &a2);

if ((a1==1&&a2==2)||(a1==2&&a2==1))printf("%d\n", 3);

else if ((a1==1&&a2==3)||(a1==3&&a2==1))printf("%d\n", 2);

else if ((a1==2&&a2==3)||(a1==3&&a2==2))printf("%d\n", 1);



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



int main(){



int a1, a2;

scanf("%d %d", &a1, &a2);

if ((a1==1&&a2==2)||(a1==2&&a2==1))printf("%d\n", 3);

else if ((a1==1&&a2==3)||(a1==3&&a2==1))printf("%d\n", 2);

else if ((a1==2&&a2==3)||(a1==3&&a2==2))printf("%d\n", 1);



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



int main(){



int a1, a2;

scanf("%d %d", &a1, &a2);

if ((a1==1&&a2==2)||(a1==2&&a2==1))printf("%d\n", 3);

else if ((a1==1&&a2==3)||(a1==3&&a2==1))printf("%d\n", 2);

else if ((a1==2&&a2==3)||(a1==3&&a2==2))printf("%d\n", 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.259906208542016x):
#include<stdio.h>



int main(){



int a1, a2;

scanf("%d %d", &a1, &a2);

if ((a1==1&&a2==2)||(a1==2&&a2==1))printf("%d\n", 3);

else if ((a1==1&&a2==3)||(a1==3&&a2==1))printf("%d\n", 2);

else if ((a1==2&&a2==3)||(a1==3&&a2==2))printf("%d\n", 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.243618316954598x):
#include<stdio.h>



int main(){



int a1, a2;

scanf("%d %d", &a1, &a2);

if ((a1==1&&a2==2)||(a1==2&&a2==1))printf("%d\n", 3);

else if ((a1==1&&a2==3)||(a1==3&&a2==1))printf("%d\n", 2);

else if ((a1==2&&a2==3)||(a1==3&&a2==2))printf("%d\n", 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.309602899542943x):
#include<stdio.h>



int main(){



int a1, a2;

scanf("%d %d", &a1, &a2);

if ((a1==1&&a2==2)||(a1==2&&a2==1))printf("%d\n", 3);

else if ((a1==1&&a2==3)||(a1==3&&a2==1))printf("%d\n", 2);

else if ((a1==2&&a2==3)||(a1==3&&a2==2))printf("%d\n", 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.306314760915379x):
#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



 

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



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

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

//* 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.376358798709653x):
#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 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.250624277748941x):
#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<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.306960232131676x):
#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;

}