stablegradients/pie-gem5-bysrc huggingface dataset:
// Original C++ solution (slower):
#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;

    }

}


// Optimized solution to the same problem (faster):
#include <stdio.h>



int main()

{

	int a, b, c;

	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 if (a==1 && b==3)

{

	printf("2");

}

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

{

	printf("2");

}

	return 0;

}

// Fastest known solution for this problem:
// Original C++ solution (slower):
#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;

        }

    }















}

// Optimized solution to the same problem (faster):
#include <stdio.h>



int main()

{

	int a, b, c;

	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 if (a==1 && b==3)

{

	printf("2");

}

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

{

	printf("2");

}

	return 0;

}

// Fastest known solution for this problem:
// Original C++ solution (slower):
#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;

     } 

     

// Optimized solution to the same problem (faster):
#include <stdio.h>



int main()

{

	int a, b, c;

	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 if (a==1 && b==3)

{

	printf("2");

}

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

{

	printf("2");

}

	return 0;

}

// Fastest known solution for this problem:
// Original C++ solution (slower):
#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;

      }

     }

}


// Optimized solution to the same problem (faster):
#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;

}

// Fastest known solution for this problem:
// Original C++ solution (slower):
#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;

}

// Optimized solution to the same problem (faster):
#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;

}

// Fastest known solution for this problem:
// Original C++ solution (slower):
//

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

}


// Optimized solution to the same problem (faster):
#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;

}

// Fastest known solution for this problem:
// Original C++ solution (slower):
#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;

}


// Optimized solution to the same problem (faster):
#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;

}

// Fastest known solution for this problem:
// Original C++ solution (slower):
#include <iostream>



using namespace std;



int main()

{

    long long int a , b; 

    cin>>a >> b;

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



    return 0;

}


// Optimized solution to the same problem (faster):
#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;

}

// Fastest known solution for this problem:
// Original C++ solution (slower):
#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);

    }

}


// Optimized solution to the same problem (faster):
#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;

}

// Fastest known solution for this problem:
// Original C++ solution (slower):
#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";

}


// Optimized solution to the same problem (faster):
#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;

}

// Fastest known solution for this problem:
// Original C++ solution (slower):
#include<iostream>

using namespace std;

int main()

{

    int a,b,d=0;

    cin>>a>>b;

    d=a+b;

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

    return 0;

}


// Optimized solution to the same problem (faster):
#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;

}

// Fastest known solution for this problem:
// Original C++ solution (slower):
#include<iostream>

using namespace std;

int main()

{

    int A,B,C=0;

    cin>>A>>B;

    C=A+B;

    cout<<6-C<<endl;

    return 0;

}


// Optimized solution to the same problem (faster):
#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;

}

// Fastest known solution for this problem:
// Original C++ solution (slower):
#include <bits/stdc++.h>

using namespace std;



int A, B;



int main () {

    cin >> A >> B;

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

}

// Optimized solution to the same problem (faster):
#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;

}

// Fastest known solution for this problem:
// Original C++ solution (slower):
#include <bits/stdc++.h>

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

// Optimized solution to the same problem (faster):
#include<cstdio>

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

// Fastest known solution for this problem:
// Original C++ solution (slower):
#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;

}

// Optimized solution to the same problem (faster):
#include<stdio.h>

int main()

{

	int angka1, angka2;

	scanf("%d %d", &angka1, &angka2);

	if (angka1==1 && angka2==2) printf("3\n");

	else if (angka1==3 && angka2==1) printf("2\n");

	else if (angka1==2 && angka2==3) printf("1\n");

	else if (angka1==1 && angka2==3) printf("2\n");

	else if (angka1==2 && angka2==1) printf("3\n");

	else if (angka1==3 && angka2==2) printf("1\n");

	return 0;

}

// Fastest known solution for this problem:
// Original C++ solution (slower):
#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;

}  

// Optimized solution to the same problem (faster):
#include<stdio.h>

int main()

{

	int angka1, angka2;

	scanf("%d %d", &angka1, &angka2);

	if (angka1==1 && angka2==2) printf("3\n");

	else if (angka1==3 && angka2==1) printf("2\n");

	else if (angka1==2 && angka2==3) printf("1\n");

	else if (angka1==1 && angka2==3) printf("2\n");

	else if (angka1==2 && angka2==1) printf("3\n");

	else if (angka1==3 && angka2==2) printf("1\n");

	return 0;

}

// Fastest known solution for this problem:
// Original C++ solution (slower):
#include <bits/stdc++.h>

using namespace std;



int a,b;

int main(){

    cin>>a>>b;

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

}

// Optimized solution to the same problem (faster):
#include<stdio.h>

int main()

{

	int angka1, angka2;

	scanf("%d %d", &angka1, &angka2);

	if (angka1==1 && angka2==2) printf("3\n");

	else if (angka1==3 && angka2==1) printf("2\n");

	else if (angka1==2 && angka2==3) printf("1\n");

	else if (angka1==1 && angka2==3) printf("2\n");

	else if (angka1==2 && angka2==1) printf("3\n");

	else if (angka1==3 && angka2==2) printf("1\n");

	return 0;

}

// Fastest known solution for this problem:
// Original C++ solution (slower):
#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;

}


// Optimized solution to the same problem (faster):
#include<stdio.h>

int main()

{

	int angka1, angka2;

	scanf("%d %d", &angka1, &angka2);

	if (angka1==1 && angka2==2) printf("3\n");

	else if (angka1==3 && angka2==1) printf("2\n");

	else if (angka1==2 && angka2==3) printf("1\n");

	else if (angka1==1 && angka2==3) printf("2\n");

	else if (angka1==2 && angka2==1) printf("3\n");

	else if (angka1==3 && angka2==2) printf("1\n");

	return 0;

}

// Fastest known solution for this problem:
// Original C++ solution (slower):
#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;

}


// Optimized solution to the same problem (faster):
#include<stdio.h>

int main()

{

	int angka1, angka2;

	scanf("%d %d", &angka1, &angka2);

	if (angka1==1 && angka2==2) printf("3\n");

	else if (angka1==3 && angka2==1) printf("2\n");

	else if (angka1==2 && angka2==3) printf("1\n");

	else if (angka1==1 && angka2==3) printf("2\n");

	else if (angka1==2 && angka2==1) printf("3\n");

	else if (angka1==3 && angka2==2) printf("1\n");

	return 0;

}

// Fastest known solution for this problem:
// Original C++ solution (slower):
#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;

}

// Optimized solution to the same problem (faster):
#include<stdio.h>

int main()

{

	int angka1, angka2;

	scanf("%d %d", &angka1, &angka2);

	if (angka1==1 && angka2==2) printf("3\n");

	else if (angka1==3 && angka2==1) printf("2\n");

	else if (angka1==2 && angka2==3) printf("1\n");

	else if (angka1==1 && angka2==3) printf("2\n");

	else if (angka1==2 && angka2==1) printf("3\n");

	else if (angka1==3 && angka2==2) printf("1\n");

	return 0;

}

// Fastest known solution for this problem:
// Original C++ solution (slower):
#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";

}


// Optimized solution to the same problem (faster):
#include<stdio.h>

int main()

{

	int angka1, angka2;

	scanf("%d %d", &angka1, &angka2);

	if (angka1==1 && angka2==2) printf("3\n");

	else if (angka1==3 && angka2==1) printf("2\n");

	else if (angka1==2 && angka2==3) printf("1\n");

	else if (angka1==1 && angka2==3) printf("2\n");

	else if (angka1==2 && angka2==1) printf("3\n");

	else if (angka1==3 && angka2==2) printf("1\n");

	return 0;

}

// Fastest known solution for this problem:
// Original C++ solution (slower):
#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;

    }

}


// Optimized solution to the same problem (faster):
#include<stdio.h>

int main()

{

	int angka1, angka2;

	scanf("%d %d", &angka1, &angka2);

	if (angka1==1 && angka2==2) printf("3\n");

	else if (angka1==3 && angka2==1) printf("2\n");

	else if (angka1==2 && angka2==3) printf("1\n");

	else if (angka1==1 && angka2==3) printf("2\n");

	else if (angka1==2 && angka2==1) printf("3\n");

	else if (angka1==3 && angka2==2) printf("1\n");

	return 0;

}

// Fastest known solution for this problem:
// Original C++ solution (slower):
#include <iostream>

using namespace std;



int main()

{

    int a, b;

    cin >> a >> b;



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

        cout << 3 << endl;



    return 0;

}


// Optimized solution to the same problem (faster):
#include <stdio.h>



int main(){

	char A, B;

	

	scanf("%c\n %c", &A, &B);

	

	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=='3'&&B=='2'){

		printf("1");

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

		printf("3");

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

		printf("1");

	}

	

	

	

	

	return 0;

}

// Fastest known solution for this problem:
// Original C++ solution (slower):
#include <bits/stdc++.h>

#define fastio() ios_base::sync_with_stdio(false);

using namespace std;

typedef long long ll;





int main(){

	set<int> t;

	int a; cin >> a; t.insert(a);

	cin >> a; t.insert(a);

	for(int i = 1; i<=3; i++) if (t.count(i)==0) {cout << i << endl; return 0;}

	

	return 0;

}


// Optimized solution to the same problem (faster):
#include <stdio.h>



int main(){

	char A, B;

	

	scanf("%c\n %c", &A, &B);

	

	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=='3'&&B=='2'){

		printf("1");

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

		printf("3");

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

		printf("1");

	}

	

	

	

	

	return 0;

}

// Fastest known solution for this problem:
// Original C++ solution (slower):
#include<bits/stdc++.h>

#define ll long long

#define mod 1000000007

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

#define v(x) vector<int> x;

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

#define s(x,n) memset(x,n,sizeof(x));

#define pb(x) push_back(x)



using namespace std;

int main()

{   fast 

    ll a,b;

    set<ll> s;

    s.insert(1);s.insert(2);s.insert(3);

    cin>>a>>b;

    s.erase(a);s.erase(b);

    auto it=s.begin();

    cout<<*it<<"\n";

    return 0;

}

// Optimized solution to the same problem (faster):
#include <stdio.h>



int main(){

	char A, B;

	

	scanf("%c\n %c", &A, &B);

	

	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=='3'&&B=='2'){

		printf("1");

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

		printf("3");

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

		printf("1");

	}

	

	

	

	

	return 0;

}

// Fastest known solution for this problem:
// Original C++ solution (slower):
// 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;

}


// Optimized solution to the same problem (faster):
#include <stdio.h>



int main(){

	char A, B;

	

	scanf("%c\n %c", &A, &B);

	

	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=='3'&&B=='2'){

		printf("1");

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

		printf("3");

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

		printf("1");

	}

	

	

	

	

	return 0;

}

// Fastest known solution for this problem:
// Original C++ solution (slower):
#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;



}


// Optimized solution to the same problem (faster):
#include <stdio.h>



int main(){

	char A, B;

	

	scanf("%c\n %c", &A, &B);

	

	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=='3'&&B=='2'){

		printf("1");

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

		printf("3");

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

		printf("1");

	}

	

	

	

	

	return 0;

}

// Fastest known solution for this problem: