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

using namespace std;

/******************************TYPE name************************************/

typedef long long ll;

typedef vector<int> vi;

typedef pair<int ,int > pii;

typedef map<int,int>mii;



/***********************************MACRO*************************/

#define test int ct;cin>>ct;while(ct--)

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

#define el <<"\n"

#define sc(n) scanf("%d",&n)

#define scl(n) scanf("%lld",&n)

#define sq(a) (a)*(a)

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

#define zro 1e-9

#define F first

#define S second

#define pb(a) push_back(a)

#define sqsum(n) (((n)*(n+1)*(2*(n)+1))/6) //sum of square number 1 to n

#define mltpls(first,last,ratio) ((last)*(ratio)-(first))/(ratio-1) //multiple series

#define linear_sum(n) (n)*(n+1)/2; //sum of 1 to n

#define arithmetic_progression(first,last,ratio) ((ratio)*(first+last))/2

#define rb rbegin()

#define re rend()

#define bg begin()

#define en end()

#define itr iterator

#define fast ios_base::sync_with_stdio(false);cin.tie(NULL);

int i;

#define gcd(a,b) __gcd(a,b)

#define gl(s) getline(cin,s)



//code: amr and music :: map of vector



/********************************code***************************/

int main()

{

    int a[3]={0};

    fo(i,2)

    {

        int k;

        cin>>k;

        a[k-1]=1;

    }

    fo(i,3)

    {

        if(a[i]==0)

            cout<<(i+1);

    }

}


// Faster C++ solution for the same problem (measured speedup: 5.2621707712726735x):
#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()

{

    int n=2;

    int a[n];

    for(int i=0;i<n;i++)

        cin>>a[i];

    sort(a,a+n);

    if(a[0]!=1)

        cout<<"1";

    else if(a[1]!=2) cout<<"2";

    else cout<<"3";

}


// Faster C++ solution for the same problem (measured speedup: 5.2487229022268105x):
#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,d=0;

    cin>>a>>b;

    d=a+b;

    cout<<(6-d)<<endl;

    return 0;

}


// Faster C++ solution for the same problem (measured speedup: 5.27068721427518x):
#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,C=0;

    cin>>A>>B;

    C=A+B;

    cout<<6-C<<endl;

    return 0;

}


// Faster C++ solution for the same problem (measured speedup: 5.27068721427518x):
#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 A, B;



int main () {

    cin >> A >> B;

    cout << 6-A-B << endl;

}

// Faster C++ solution for the same problem (measured speedup: 5.270836159858428x):
#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;



//Compiler version g++ 6.3.0



int main()

{

    int a[3]={

      1,2,3

    },i,j,c,b;

    

   cin>>c>>b;

   

     for(j=0;j<3;j++){

       if(a[j]==c||a[j]==b) a[j]=0;

     }

     for(j=0;j<3;j++){

      if(a[j]!=0){

        cout<<a[j]<<endl;

        return 0;

      }

     }

}


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

int main ()

{

	int A,B; 

	scanf("%d",&A);

	scanf("%d",&B);

	

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

	

	return 0;

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

#define ll long long

#define ull unsigned long long

#define MAX_INF 0x3f

#define MAX_INF_VAL 0x3f3f3f3f

#define MAX_INF_VAL_LL 0x3f3f3f3f3f3f3f3f

#define pi 3.141592653589

#define eps 1e-6

//#define p 2173412051LL

//#define sz 2



using namespace std;



bool vis[ 4 ];



int main() {

	int a, b;

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

	vis[ a ] = vis[ b ] = true;

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

		if( !vis[ i ] ) {

			printf( "%d", i );

			return 0;

		}

	return 0;

}

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

int main ()

{

	int A,B; 

	scanf("%d",&A);

	scanf("%d",&B);

	

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

	

	return 0;

}
// Slower C++ solution:
//

//  main.cpp

//  vjudge

//

//  Created by Sudipto Mondal on 7/9/20.

//  Copyright © 2020 Sudipto Mondal. All rights reserved.

//



#include <iostream>

using namespace std;

int main(int argc, const char * argv[]) {

    long long int a,b;

    cin>>a>>b;

    

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

        cout<<"3"<<endl;

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

        cout<<"1"<<endl;

    }else{

        cout<<2<<endl;

    }

    return 0;

}


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

int main ()

{

	int A,B; 

	scanf("%d",&A);

	scanf("%d",&B);

	

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

	

	return 0;

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

#include<iomanip>

using namespace std;

int main()

{

          long long 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

                    cout<<"2"<<endl;

return 0;

}


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

int main ()

{

	int A,B; 

	scanf("%d",&A);

	scanf("%d",&B);

	

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

	

	return 0;

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



using namespace std;



int main()

{

    long long int a , b; 

    cin>>a >> b;

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



    return 0;

}


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

int main ()

{

	int A,B; 

	scanf("%d",&A);

	scanf("%d",&B);

	

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

	

	return 0;

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

using namespace std;

/******************************TYPE name************************************/

typedef long long ll;

typedef vector<int> vi;

typedef pair<int ,int > pii;

typedef map<int,int>mii;



/***********************************MACRO*************************/

#define test int ct;cin>>ct;while(ct--)

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

#define el <<"\n"

#define sc(n) scanf("%d",&n)

#define scl(n) scanf("%lld",&n)

#define sq(a) (a)*(a)

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

#define zro 1e-9

#define F first

#define S second

#define pb(a) push_back(a)

#define sqsum(n) (((n)*(n+1)*(2*(n)+1))/6) //sum of square number 1 to n

#define mltpls(first,last,ratio) ((last)*(ratio)-(first))/(ratio-1) //multiple series

#define linear_sum(n) (n)*(n+1)/2; //sum of 1 to n

#define arithmetic_progression(first,last,ratio) ((ratio)*(first+last))/2

#define rb rbegin()

#define re rend()

#define bg begin()

#define en end()

#define itr iterator

#define fast ios_base::sync_with_stdio(false);cin.tie(NULL);

int i;

#define gcd(a,b) __gcd(a,b)

#define gl(s) getline(cin,s)



//code: amr and music :: map of vector



/********************************code***************************/

int main()

{

    int a[3]={0};

    fo(i,2)

    {

        int k;

        cin>>k;

        a[k-1]=1;

    }

    fo(i,3)

    {

        if(a[i]==0)

            cout<<(i+1);

    }

}


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

int main ()

{

	int A,B; 

	scanf("%d",&A);

	scanf("%d",&B);

	

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

	

	return 0;

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

using namespace std;

int main()

{

    int n=2;

    int a[n];

    for(int i=0;i<n;i++)

        cin>>a[i];

    sort(a,a+n);

    if(a[0]!=1)

        cout<<"1";

    else if(a[1]!=2) cout<<"2";

    else cout<<"3";

}


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

int main ()

{

	int A,B; 

	scanf("%d",&A);

	scanf("%d",&B);

	

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

	

	return 0;

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

using namespace std;

int main()

{

    int a,b,d=0;

    cin>>a>>b;

    d=a+b;

    cout<<(6-d)<<endl;

    return 0;

}


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

int main ()

{

	int A,B; 

	scanf("%d",&A);

	scanf("%d",&B);

	

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

	

	return 0;

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

using namespace std;

int main()

{

    int A,B,C=0;

    cin>>A>>B;

    C=A+B;

    cout<<6-C<<endl;

    return 0;

}


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

int main ()

{

	int A,B; 

	scanf("%d",&A);

	scanf("%d",&B);

	

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

	

	return 0;

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

using namespace std;



int A, B;



int main () {

    cin >> A >> B;

    cout << 6-A-B << endl;

}

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

int main ()

{

	int A,B; 

	scanf("%d",&A);

	scanf("%d",&B);

	

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

	

	return 0;

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

int main(){int a,b;scanf("%d %d",&a,&b);printf("%d\n",a^b);}

// Faster C++ solution for the same problem (measured speedup: 5.198506003374966x):
#include<cstdio>

int main(){int a,b;scanf("%d%d",&a,&b);printf("%d\n",a^b);}
// Slower C++ solution:
#include <bits/stdc++.h>

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

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

 

using namespace std;

 

int main(){

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



	int ans;

	

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

	

	cout << ans;

	

	return 0;

}

// Faster C++ solution for the same problem (measured speedup: 5.262709039964607x):
#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 fore(i,a,b) for(int i=int(a); i < int(b); i++)

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

 

using namespace std;

 

int main(){

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



	int ans;

	

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

	

	cout << ans;

	

	return 0;

}

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



int main (){

	

	int a,b,c;

	scanf ("%d", &a);

	scanf ("%d", &b);

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

		printf ("3");

	}

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

		printf ("2");

	}

	else 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||a==2) && (b==2||b==1))

cout<<3<<endl;

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

cout<<2<<endl;

else

cout<<1<<endl;

}  

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



int main (){

	

	int a,b,c;

	scanf ("%d", &a);

	scanf ("%d", &b);

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

		printf ("3");

	}

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

		printf ("2");

	}

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

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

}

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



int main (){

	

	int a,b,c;

	scanf ("%d", &a);

	scanf ("%d", &b);

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

		printf ("3");

	}

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

		printf ("2");

	}

	else if(a == 2 && b == 3 || 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.374653375521935x):
#include <stdio.h>



int main (){

	

	int a,b,c;

	scanf ("%d", &a);

	scanf ("%d", &b);

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

		printf ("3");

	}

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

		printf ("2");

	}

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

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

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

	        cout<<i;

	        return 0;

	    }

	}

	return 0;

}


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



int main (){

	

	int a,b,c;

	scanf ("%d", &a);

	scanf ("%d", &b);

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

		printf ("3");

	}

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

		printf ("2");

	}

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

		printf ("1");

	}

	return 0;

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



using namespace std;

#define ll long long int

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

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

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

#define nl cout<<"\n";

#define vi vector<int>

#define pb push_back

#define pr pair<ll, ll>



class triplet{

    ll f,s,t;

};



int main(){

   ll A,B,C;

   cin>>A>>B;

   cout<<6-A-B;

}

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



int main (){

	

	int a,b,c;

	scanf ("%d", &a);

	scanf ("%d", &b);

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

		printf ("3");

	}

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

		printf ("2");

	}

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

    cin>>a>>b;

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

        cout<<"3";

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

        cout<<"2";

    else

        cout<<"1";

}


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



int main (){

	

	int a,b,c;

	scanf ("%d", &a);

	scanf ("%d", &b);

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

		printf ("3");

	}

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

		printf ("2");

	}

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

		printf ("1");

	}

	return 0;

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

#include <cstdio>

#include <cstring>

#include <cmath>

#include <cstring>

#include <chrono>

#include <complex>

#define endl "\n"

#define ll long long int

#define vi vector<int>

#define vll vector<ll>

#define vvi vector < vi >

#define pii pair<int,int>

#define pll pair<long long, long long>

#define mod 1000000007

#define inf 1000000000000000001;

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

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

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

#define eb emplace_back

#define f first

#define s second



using namespace std;

int a,b;



int main(){

    cin>>a>>b;

    if(a+b==3){

        cout<<3;

    }

    else if(a+b==4){

        cout<<2;

    }

    else{

        cout<<1;

    }

}


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



int main (){

	

	int a,b,c;

	scanf ("%d", &a);

	scanf ("%d", &b);

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

		printf ("3");

	}

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

		printf ("2");

	}

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

		printf ("1");

	}

	return 0;

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

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

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

 

using namespace std;

 

int main(){

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



	int ans;

	

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

	

	cout << ans;

	

	return 0;

}

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

int main () {

	int A;

	int B;

	scanf("%d\n", &A);

	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{

				printf("1\n");

			}

			return 0;

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

using namespace std;

int main()

{

	int a,b,c;

	cin >>a>>b;

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

cout<<3<<endl;

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

cout<<2<<endl;

else

cout<<1<<endl;

}  

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

int main () {

	int A;

	int B;

	scanf("%d\n", &A);

	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{

				printf("1\n");

			}

			return 0;

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

using namespace std;



int a,b;

int main(){

    cin>>a>>b;

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

}

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

int main () {

	int A;

	int B;

	scanf("%d\n", &A);

	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{

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

int main () {

	int A;

	int B;

	scanf("%d\n", &A);

	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{

				printf("1\n");

			}

			return 0;

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

using namespace std;



int main() {

	int a,b;

	cin>>a>>b;

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

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

	        cout<<i;

	        return 0;

	    }

	}

	return 0;

}


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

int main () {

	int A;

	int B;

	scanf("%d\n", &A);

	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{

				printf("1\n");

			}

			return 0;

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



using namespace std;

#define ll long long int

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

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

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

#define nl cout<<"\n";

#define vi vector<int>

#define pb push_back

#define pr pair<ll, ll>



class triplet{

    ll f,s,t;

};



int main(){

   ll A,B,C;

   cin>>A>>B;

   cout<<6-A-B;

}

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

int main () {

	int A;

	int B;

	scanf("%d\n", &A);

	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{

				printf("1\n");

			}

			return 0;

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

using namespace std;



int main() {

    int a,b;

    cin>>a>>b;

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

        cout<<"3";

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

        cout<<"2";

    else

        cout<<"1";

}


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

int main () {

	int A;

	int B;

	scanf("%d\n", &A);

	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{

				printf("1\n");

			}

			return 0;

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

#include <cstdio>

#include <cstring>

#include <cmath>

#include <cstring>

#include <chrono>

#include <complex>

#define endl "\n"

#define ll long long int

#define vi vector<int>

#define vll vector<ll>

#define vvi vector < vi >

#define pii pair<int,int>

#define pll pair<long long, long long>

#define mod 1000000007

#define inf 1000000000000000001;

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

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

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

#define eb emplace_back

#define f first

#define s second



using namespace std;

int a,b;



int main(){

    cin>>a>>b;

    if(a+b==3){

        cout<<3;

    }

    else if(a+b==4){

        cout<<2;

    }

    else{

        cout<<1;

    }

}


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

int main () {

	int A;

	int B;

	scanf("%d\n", &A);

	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{

				printf("1\n");

			}

			return 0;

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

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

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

 

using namespace std;

 

int main(){

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



	int ans;

	

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

	

	cout << ans;

	

	return 0;

}

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



int main(){

	int A, B;

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

    if(A == 1){

    	if(B == 2){

    		printf("%d",3);

		}

		else{

			printf("%d",2);

		}

	}

	else if(A == 2){

		if(B == 1){

			printf("%d",3);

		}

		else{

			printf("%d",1);

		}

	}

	else if(A == 3){

		if(B == 2){

			printf("%d",1);

		}

		else{

			printf("%d",2);

		}

	}

	return 0;

}