stablegradients/pie-gem5-pairs huggingface dataset:
// 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.323629384576657x):
#include <stdio.h>



int main (){

	int A, B;

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

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

		printf ("3");

} else if (A == 1 && B == 3){

	printf("2");

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

	printf("1");

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

	printf("3");

}else if (A == 3 && B == 1){

	printf("2");

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

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



int main (){

	int A, B;

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

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

		printf ("3");

} else if (A == 1 && B == 3){

	printf("2");

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

	printf("1");

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

	printf("3");

}else if (A == 3 && B == 1){

	printf("2");

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

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



int main (){

	int A, B;

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

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

		printf ("3");

} else if (A == 1 && B == 3){

	printf("2");

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

	printf("1");

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

	printf("3");

}else if (A == 3 && B == 1){

	printf("2");

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

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



int main (){

	int A, B;

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

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

		printf ("3");

} else if (A == 1 && B == 3){

	printf("2");

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

	printf("1");

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

	printf("3");

}else if (A == 3 && B == 1){

	printf("2");

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

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



int main (){

	int A, B;

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

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

		printf ("3");

} else if (A == 1 && B == 3){

	printf("2");

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

	printf("1");

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

	printf("3");

}else if (A == 3 && B == 1){

	printf("2");

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

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



int main (){

	int A, B;

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

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

		printf ("3");

} else if (A == 1 && B == 3){

	printf("2");

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

	printf("1");

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

	printf("3");

}else if (A == 3 && B == 1){

	printf("2");

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

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



int main (){

	int A, B;

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

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

		printf ("3");

} else if (A == 1 && B == 3){

	printf("2");

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

	printf("1");

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

	printf("3");

}else if (A == 3 && B == 1){

	printf("2");

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

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



int main (){

	int A, B;

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

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

		printf ("3");

} else if (A == 1 && B == 3){

	printf("2");

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

	printf("1");

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

	printf("3");

}else if (A == 3 && B == 1){

	printf("2");

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

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



int main (){

	int A, B;

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

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

		printf ("3");

} else if (A == 1 && B == 3){

	printf("2");

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

	printf("1");

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

	printf("3");

}else if (A == 3 && B == 1){

	printf("2");

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

	printf("1");

}

	return 0;

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

using namespace std;



int A, B;



int main () {

    cin >> A >> B;

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

}

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



int main (){

	int A, B;

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

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

		printf ("3");

} else if (A == 1 && B == 3){

	printf("2");

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

	printf("1");

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

	printf("3");

}else if (A == 3 && B == 1){

	printf("2");

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

	printf("1");

}

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



int main()

{

  int A, B;

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

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

  return 0;

}
// Slower C++ solution:
//

//  main.cpp

//  vjudge

//

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

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

//



#include <iostream>

using namespace std;

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

    long long int a,b;

    cin>>a>>b;

    

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

        cout<<"3"<<endl;

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

        cout<<"1"<<endl;

    }else{

        cout<<2<<endl;

    }

    return 0;

}


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

#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.252503157467078x):
#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()

{

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

/******************************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.252550261871046x):
#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=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.23912697875297x):
#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,d=0;

    cin>>a>>b;

    d=a+b;

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

    return 0;

}


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

    cin>>A>>B;

    C=A+B;

    cout<<6-C<<endl;

    return 0;

}


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

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

}

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



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



int main (){

	int A, B;

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

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

	

	return 0;

}
// Slower C++ solution:
//

//  main.cpp

//  vjudge

//

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

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

//



#include <iostream>

using namespace std;

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

    long long int a,b;

    cin>>a>>b;

    

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

        cout<<"3"<<endl;

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

        cout<<"1"<<endl;

    }else{

        cout<<2<<endl;

    }

    return 0;

}


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

#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.252503157467078x):
#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()

{

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

/******************************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.252550261871046x):
#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=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.23912697875297x):
#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,d=0;

    cin>>a>>b;

    d=a+b;

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

    return 0;

}


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

    cin>>A>>B;

    C=A+B;

    cout<<6-C<<endl;

    return 0;

}


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

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

}

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



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

	int main(){

		int A,B;

		

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

		

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

		return 0;

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

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

	int main(){

		int A,B;

		

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

		

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

		return 0;

	}
// Slower C++ solution:
//

//  main.cpp

//  vjudge

//

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

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

//



#include <iostream>

using namespace std;

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

    long long int a,b;

    cin>>a>>b;

    

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

        cout<<"3"<<endl;

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

        cout<<"1"<<endl;

    }else{

        cout<<2<<endl;

    }

    return 0;

}


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

	int main(){

		int A,B;

		

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

		

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

		return 0;

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

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

	int main(){

		int A,B;

		

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

		

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

		return 0;

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



using namespace std;



int main()

{

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

	int main(){

		int A,B;

		

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

		

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

		return 0;

	}