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



using namespace std;



int main()

{

	int a,b,c;

	cin>>a;

	cin>>b;

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

	{

		c=3;

	}

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

	{

		c=1;

	}

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

	{

		c=2;

	}

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

	{

		c=2;

	}

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

	{

		c=3;

	}

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

	{

		c=1;

	}

	

	cout<<c;

	

	

	

	return 0;

}

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



int main(){

	int X;

	int Y;

	

	scanf("%d %d",&X,&Y);

	printf("%d\n",6-X-Y);

	return 0;

	

	

	

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

using namespace std;

int main()

{

    int n,m;

    cin>>n>>m;

    cout<<6-n-m<<endl;

    return 0;

}


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



int main(){

	int X;

	int Y;

	

	scanf("%d %d",&X,&Y);

	printf("%d\n",6-X-Y);

	return 0;

	

	

	

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

int main ()

{

    int A,B;

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

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

    {

        printf ("3\n");

    }

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

    {

        printf ("1\n");

    }

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

    {

        printf ("2\n");

    }

    return 0;

}

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



int main(){

	int X;

	int Y;

	

	scanf("%d %d",&X,&Y);

	printf("%d\n",6-X-Y);

	return 0;

	

	

	

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

#define pb push_back

#define mk make_pair

#define ll long long

#define ss second

#define ff first

#define pll pair<ll,ll>

#define vll vector<ll>

#define mll map<ll,ll>

#define mod 1000000007

#define w(x) ll x; cin>>x; while(x--)

#define ps(x,y) fixed<<setprecision(y)<<x;

#define fo(i, j, k, in) for (ll i=j ; i<k ; i+=in)

#define re(i, j) fo(i, 0, j, 1)

#define pi 3.1415926535897932384626433832795

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

#define countbit(x) __builtin_popcount(x)

#define mod 1000000007

#define lo lower_bound

#define de(n) ll n;cin>>n;

#define def(a,n) ll n;cin>>n;ll a[n];re(i,n){cin>>a[i];}

#define defi(a,n,k) ll n;cin>>n; ll k;cin>>k;ll a[n];re(i,n){cin>>a[i];}

#define deb(x) cout<<#x<<"="<<x<<endl;

#define tr(it,a) for(auto it=a.begin();it!=a.end();it++)

#define nl cout<<endl;

using namespace std;

void cp()

{

    ios :: sync_with_stdio(false); cin.tie(0); cout.tie(0); 

    #ifndef ONLINE_JUDGE  

    freopen("input.txt", "r", stdin);  

    freopen("output.txt", "w", stdout);

#endif

}

int main()

{

    //cp();

    //w(x)

    de(a);

    de(b);

    re(i,3)

    {

        if(a==i+1)

        continue;

        else if(b==i+1)

        continue;

        else

        {

            cout<<i+1;

        } 

    }

    return 0;

}

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



int main(){

	int X;

	int Y;

	

	scanf("%d %d",&X,&Y);

	printf("%d\n",6-X-Y);

	return 0;

	

	

	

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

using namespace std;



int A, B;



int main () {

	cin >> A >> B;

	if (A==1){

		if (B==2){

			cout << "3";

		} else {

			cout << "2";

		}

	} else if (A==2){

		if (B==1){

			cout << "3";

		} else {

			cout << "1";

		}

	} else if (A==3){

		if (B==1){

			cout << "2";

		} else {

			cout << "1";

		}

	}

}

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



int main(){

	int X;

	int Y;

	

	scanf("%d %d",&X,&Y);

	printf("%d\n",6-X-Y);

	return 0;

	

	

	

}
// Slower C++ solution:
//Bismillahir Rahmanir Rahim

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

                    cout<<"1";

                }

                else{

                    cout<<"2";

                }





         }

//Pavel


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



int main(){

	int X;

	int Y;

	

	scanf("%d %d",&X,&Y);

	printf("%d\n",6-X-Y);

	return 0;

	

	

	

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

using namespace std;

#define Y cout<<"YES"<<endl;

#define N cout<<"NO"<<endl;

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

#define eki int n; cin>>n;

#define loop for(int i=0; i<n; i++)

int main()

{  

    int a, b;

    cin>>a>>b;

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

    cout<<1<<endl;

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

    cout<<2<<endl;

    else cout<<3<<endl;

    

}






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



int main(){

	int X;

	int Y;

	

	scanf("%d %d",&X,&Y);

	printf("%d\n",6-X-Y);

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

    }

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

    {

        cout << "1" << endl;

    }

    else

    {

        cout << "2" << endl;

    }

}


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



int main(){

	int X;

	int Y;

	

	scanf("%d %d",&X,&Y);

	printf("%d\n",6-X-Y);

	return 0;

	

	

	

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

using namespace std;

#define int  long long

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

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

#define endl   "\n"















int32_t main()

{

    ios_base::sync_with_stdio(false);

    cin.tie(NULL);

    int  a,b;

    cin>>a>>b;

    vector<int>dp(3,0);

    dp[a-1]=1;

    dp[b-1]=1;

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

    {

        if(dp[i]==0)

        {

            cout<<i+1<<endl;

            break;

        }

    }















}

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



int main(){

	int X;

	int Y;

	

	scanf("%d %d",&X,&Y);

	printf("%d\n",6-X-Y);

	return 0;

	

	

	

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

using namespace std;

int main()

{ 

     int a,b,c;

     cin>>a>>b;

      if(a+b==3)

     { 

         cout<<"3";

     }

     else if(a+b==5)

     { 

         cout<<"1";

     } 

     else if(a+b==4)

     {

         cout<<"2";

     }

      

     return 0;

     } 

     

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



int main(){

	int X;

	int Y;

	

	scanf("%d %d",&X,&Y);

	printf("%d\n",6-X-Y);

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

int main()

{ int a[2];

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

    scanf("%d",&a[i]);

    if(a[0]==1 && a[1]==2)

       printf("3");

    else if(a[0]==1 && a[1]==3)

    printf("2");

    else if(a[0]==2 && a[1]==3)

    printf("1");

    else if(a[0]==3 && a[1]==1)            printf("2");

    else if(a[0]==3 && a[1]==2)

    printf("1");

    else if(a[0]==2 && a[1]==1)

    printf("3");





    

    

    

    

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



int main() {

  int a, b;

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

  if(a == 1 && b == 2) puts("3");

  else if(a == 1 && b == 3) puts("2");

  else if(a == 2 && b == 3)puts("1");

  else if(a == 3 && b == 1) puts("2");

  else if(a == 3 && b == 2) puts("1");

  else if(a == 2 && b == 1) puts("3");

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



int main() {

  int a, b;

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

  if(a == 1 && b == 2) puts("3");

  else if(a == 1 && b == 3) puts("2");

  else if(a == 2 && b == 3)puts("1");

  else if(a == 3 && b == 1) puts("2");

  else if(a == 3 && b == 2) puts("1");

  else if(a == 2 && b == 1) puts("3");

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



int main() {

  int a, b;

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

  if(a == 1 && b == 2) puts("3");

  else if(a == 1 && b == 3) puts("2");

  else if(a == 2 && b == 3)puts("1");

  else if(a == 3 && b == 1) puts("2");

  else if(a == 3 && b == 2) puts("1");

  else if(a == 2 && b == 1) puts("3");

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



int main() {

  int a, b;

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

  if(a == 1 && b == 2) puts("3");

  else if(a == 1 && b == 3) puts("2");

  else if(a == 2 && b == 3)puts("1");

  else if(a == 3 && b == 1) puts("2");

  else if(a == 3 && b == 2) puts("1");

  else if(a == 2 && b == 1) puts("3");

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



int main() {

  int a, b;

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

  if(a == 1 && b == 2) puts("3");

  else if(a == 1 && b == 3) puts("2");

  else if(a == 2 && b == 3)puts("1");

  else if(a == 3 && b == 1) puts("2");

  else if(a == 3 && b == 2) puts("1");

  else if(a == 2 && b == 1) puts("3");

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



int main() {

  int a, b;

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

  if(a == 1 && b == 2) puts("3");

  else if(a == 1 && b == 3) puts("2");

  else if(a == 2 && b == 3)puts("1");

  else if(a == 3 && b == 1) puts("2");

  else if(a == 3 && b == 2) puts("1");

  else if(a == 2 && b == 1) puts("3");

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



int main() {

  int a, b;

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

  if(a == 1 && b == 2) puts("3");

  else if(a == 1 && b == 3) puts("2");

  else if(a == 2 && b == 3)puts("1");

  else if(a == 3 && b == 1) puts("2");

  else if(a == 3 && b == 2) puts("1");

  else if(a == 2 && b == 1) puts("3");

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



int main() {

  int a, b;

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

  if(a == 1 && b == 2) puts("3");

  else if(a == 1 && b == 3) puts("2");

  else if(a == 2 && b == 3)puts("1");

  else if(a == 3 && b == 1) puts("2");

  else if(a == 3 && b == 2) puts("1");

  else if(a == 2 && b == 1) puts("3");

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



int main() {

  int a, b;

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

  if(a == 1 && b == 2) puts("3");

  else if(a == 1 && b == 3) puts("2");

  else if(a == 2 && b == 3)puts("1");

  else if(a == 3 && b == 1) puts("2");

  else if(a == 3 && b == 2) puts("1");

  else if(a == 2 && b == 1) puts("3");

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



int main() {

  int a, b;

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

  if(a == 1 && b == 2) puts("3");

  else if(a == 1 && b == 3) puts("2");

  else if(a == 2 && b == 3)puts("1");

  else if(a == 3 && b == 1) puts("2");

  else if(a == 3 && b == 2) puts("1");

  else if(a == 2 && b == 1) puts("3");

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



int main() {

	int a, b;

	scanf("%d\n %d", &a, &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 {

		printf ("1");

	}

	

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



int main() {

	int a, b;

	scanf("%d\n %d", &a, &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 {

		printf ("1");

	}

	

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



int main() {

	int a, b;

	scanf("%d\n %d", &a, &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 {

		printf ("1");

	}

	

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



int main() {

	int a, b;

	scanf("%d\n %d", &a, &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 {

		printf ("1");

	}

	

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



int main() {

	int a, b;

	scanf("%d\n %d", &a, &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 {

		printf ("1");

	}

	

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



int main() {

	int a, b;

	scanf("%d\n %d", &a, &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 {

		printf ("1");

	}

	

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



int main() {

	int a, b;

	scanf("%d\n %d", &a, &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 {

		printf ("1");

	}

	

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



int main() {

	int a, b;

	scanf("%d\n %d", &a, &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 {

		printf ("1");

	}

	

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



int main() {

	int a, b;

	scanf("%d\n %d", &a, &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 {

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



int main() {

	int a, b;

	scanf("%d\n %d", &a, &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 {

		printf ("1");

	}

	

	return 0;

}