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

}
// 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.246707087134853x):
#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;

}
// 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.309382642134391x):
#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;

}
// 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.300511436579779x):
#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;

}
// 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.300964193482088x):
#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;

}
// 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.322351744454473x):
#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;

}
// 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.314969126149392x):
#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;

}
// 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.405850393630425x):
#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;

}
// 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.3007206877139055x):
#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;

}
// 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 A, B;

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

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



	

	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 A, B;

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

    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 A, B;

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

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



	

	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 A, B;

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

	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 A, B;

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

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



	

	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 A, B;

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

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



	

	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 A, B;

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

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



	

	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 A, B;

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

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



	

	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 A, B;

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

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



	

	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 A, B;

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

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



	

	return 0;

}
// 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 A,B;

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

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

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 A,B;

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

    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 A,B;

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

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

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 A,B;

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

	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 A,B;

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

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

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 A,B;

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

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

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 A,B;

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

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

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 A,B;

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

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

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 A,B;

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

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

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 A,B;

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

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

return 0;

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

int main()

{

	int numA, numB;

	scanf("%d", &numA);

	scanf("%d", &numB);

	

	printf("%d\n", 6-numA-numB);

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

int main()

{

	int numA, numB;

	scanf("%d", &numA);

	scanf("%d", &numB);

	

	printf("%d\n", 6-numA-numB);

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

int main()

{

	int numA, numB;

	scanf("%d", &numA);

	scanf("%d", &numB);

	

	printf("%d\n", 6-numA-numB);

	return 0;

}