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

#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.258662779918008x):
#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 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.251368504386572x):
#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;

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

#include <stdlib.h>



int main()

{

    int a,b;



    scanf("%d", &a);

    scanf("%d", &b);



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

        printf("3\n");

    }

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

        printf("1\n");

    }

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

        printf("2\n");

    }

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

        printf("3\n");

    }

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

        printf("1\n");

    }

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

        printf("2\n");

    }



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

#include <stdlib.h>



int main()

{

    int a,b;



    scanf("%d", &a);

    scanf("%d", &b);



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

        printf("3\n");

    }

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

        printf("1\n");

    }

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

        printf("2\n");

    }

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

        printf("3\n");

    }

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

        printf("1\n");

    }

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

        printf("2\n");

    }



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

#include <stdlib.h>



int main()

{

    int a,b;



    scanf("%d", &a);

    scanf("%d", &b);



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

        printf("3\n");

    }

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

        printf("1\n");

    }

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

        printf("2\n");

    }

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

        printf("3\n");

    }

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

        printf("1\n");

    }

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

        printf("2\n");

    }



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

#include <stdlib.h>



int main()

{

    int a,b;



    scanf("%d", &a);

    scanf("%d", &b);



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

        printf("3\n");

    }

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

        printf("1\n");

    }

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

        printf("2\n");

    }

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

        printf("3\n");

    }

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

        printf("1\n");

    }

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

        printf("2\n");

    }



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

#include <stdlib.h>



int main()

{

    int a,b;



    scanf("%d", &a);

    scanf("%d", &b);



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

        printf("3\n");

    }

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

        printf("1\n");

    }

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

        printf("2\n");

    }

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

        printf("3\n");

    }

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

        printf("1\n");

    }

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

        printf("2\n");

    }



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

#include <stdlib.h>



int main()

{

    int a,b;



    scanf("%d", &a);

    scanf("%d", &b);



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

        printf("3\n");

    }

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

        printf("1\n");

    }

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

        printf("2\n");

    }

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

        printf("3\n");

    }

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

        printf("1\n");

    }

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

        printf("2\n");

    }



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

#include <stdlib.h>



int main()

{

    int a,b;



    scanf("%d", &a);

    scanf("%d", &b);



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

        printf("3\n");

    }

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

        printf("1\n");

    }

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

        printf("2\n");

    }

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

        printf("3\n");

    }

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

        printf("1\n");

    }

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

        printf("2\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" << 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.304998186423747x):
#include <stdio.h>

#include <stdlib.h>



int main()

{

    int a,b;



    scanf("%d", &a);

    scanf("%d", &b);



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

        printf("3\n");

    }

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

        printf("1\n");

    }

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

        printf("2\n");

    }

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

        printf("3\n");

    }

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

        printf("1\n");

    }

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

        printf("2\n");

    }



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

#include <stdlib.h>



int main()

{

    int a,b;



    scanf("%d", &a);

    scanf("%d", &b);



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

        printf("3\n");

    }

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

        printf("1\n");

    }

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

        printf("2\n");

    }

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

        printf("3\n");

    }

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

        printf("1\n");

    }

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

        printf("2\n");

    }



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

#include <stdlib.h>



int main()

{

    int a,b;



    scanf("%d", &a);

    scanf("%d", &b);



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

        printf("3\n");

    }

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

        printf("1\n");

    }

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

        printf("2\n");

    }

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

        printf("3\n");

    }

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

        printf("1\n");

    }

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

        printf("2\n");

    }



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

int main(){

	

	int a;

	int b;

	

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

	getchar();

	

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

		printf("3");

	}

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

		printf("1");

	}

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

		printf("2");

	}

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

int main(){

	

	int a;

	int b;

	

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

	getchar();

	

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

		printf("3");

	}

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

		printf("1");

	}

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

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

int main(){

	

	int a;

	int b;

	

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

	getchar();

	

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

		printf("3");

	}

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

		printf("1");

	}

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

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

int main(){

	

	int a;

	int b;

	

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

	getchar();

	

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

		printf("3");

	}

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

		printf("1");

	}

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

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

int main(){

	

	int a;

	int b;

	

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

	getchar();

	

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

		printf("3");

	}

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

		printf("1");

	}

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

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

int main(){

	

	int a;

	int b;

	

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

	getchar();

	

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

		printf("3");

	}

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

		printf("1");

	}

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

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

int main(){

	

	int a;

	int b;

	

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

	getchar();

	

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

		printf("3");

	}

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

		printf("1");

	}

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

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

int main(){

	

	int a;

	int b;

	

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

	getchar();

	

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

		printf("3");

	}

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

		printf("1");

	}

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

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

int main(){

	

	int a;

	int b;

	

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

	getchar();

	

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

		printf("3");

	}

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

		printf("1");

	}

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

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

int main(){

	

	int a;

	int b;

	

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

	getchar();

	

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

		printf("3");

	}

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

		printf("1");

	}

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

		printf("2");

	}

	return 0;

}