stablegradients/pie-gem5-pairs huggingface dataset:
// Slower C++ solution:
#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;

    }

}


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

int main()

{

	int x,y;

	scanf("%d %d",&x,&y);

	if(x==1 && y==2 || x==2 && y==1){

		printf("3");

	}

	if(x==2 && y==3 || x==3 && y==2){

		printf("1");

	}

	if(x==1 && y==3 || x==3 && y==1){

		printf("2");

	}

	return 0;

}
// Slower C++ solution:
#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;

}

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

int main(){

  int A;

  scanf("%d", &A);

  int B;

  scanf("%d", &B);

  

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

    printf("2");

  }

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

    printf("3");

  }

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

    printf("1");

  }

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

    printf("2");

  }

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

    printf("3");

  }

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

    printf("1");

  return 0;

  }

}
// Slower C++ solution:
#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;

}  

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

int main(){

  int A;

  scanf("%d", &A);

  int B;

  scanf("%d", &B);

  

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

    printf("2");

  }

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

    printf("3");

  }

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

    printf("1");

  }

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

    printf("2");

  }

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

    printf("3");

  }

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

int main(){

  int A;

  scanf("%d", &A);

  int B;

  scanf("%d", &B);

  

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

    printf("2");

  }

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

    printf("3");

  }

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

    printf("1");

  }

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

    printf("2");

  }

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

    printf("3");

  }

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

    printf("1");

  return 0;

  }

}
// Slower C++ solution:
#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;

}


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

int main(){

  int A;

  scanf("%d", &A);

  int B;

  scanf("%d", &B);

  

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

    printf("2");

  }

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

    printf("3");

  }

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

    printf("1");

  }

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

    printf("2");

  }

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

    printf("3");

  }

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

    printf("1");

  return 0;

  }

}
// Slower C++ solution:
#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;

}


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

int main(){

  int A;

  scanf("%d", &A);

  int B;

  scanf("%d", &B);

  

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

    printf("2");

  }

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

    printf("3");

  }

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

    printf("1");

  }

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

    printf("2");

  }

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

    printf("3");

  }

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

    printf("1");

  return 0;

  }

}
// Slower C++ solution:
#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;

}

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

int main(){

  int A;

  scanf("%d", &A);

  int B;

  scanf("%d", &B);

  

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

    printf("2");

  }

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

    printf("3");

  }

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

    printf("1");

  }

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

    printf("2");

  }

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

    printf("3");

  }

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

    printf("1");

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

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

        cout<<"2";

    else

        cout<<"1";

}


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

int main(){

  int A;

  scanf("%d", &A);

  int B;

  scanf("%d", &B);

  

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

    printf("2");

  }

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

    printf("3");

  }

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

    printf("1");

  }

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

    printf("2");

  }

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

    printf("3");

  }

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

    printf("1");

  return 0;

  }

}
// Slower C++ solution:
#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;

    }

}


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

int main(){

  int A;

  scanf("%d", &A);

  int B;

  scanf("%d", &B);

  

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

    printf("2");

  }

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

    printf("3");

  }

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

    printf("1");

  }

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

    printf("2");

  }

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

    printf("3");

  }

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

    printf("1");

  return 0;

  }

}
// Slower C++ solution:
#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;

}

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

int main()

{

	int A;

	int B;

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

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

	

	

	

	return 0;

}
// Slower C++ solution:
#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;

}  

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

int main()

{

	int A;

	int B;

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

	printf("%d",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.270657388113956x):
#include<stdio.h>

int main()

{

	int A;

	int B;

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

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

	

	

	

	return 0;

}
// Slower C++ solution:
#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;

}


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

int main()

{

	int A;

	int B;

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

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

	

	

	

	return 0;

}
// Slower C++ solution:
#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;

}


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

int main()

{

	int A;

	int B;

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

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

	

	

	

	return 0;

}
// Slower C++ solution:
#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;

}

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

int main()

{

	int A;

	int B;

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

	printf("%d",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";

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

        cout<<"2";

    else

        cout<<"1";

}


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

int main()

{

	int A;

	int B;

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

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

	

	

	

	return 0;

}
// Slower C++ solution:
#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;

    }

}


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

int main()

{

	int A;

	int B;

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

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

	

	

	

	return 0;

}
// Slower C++ solution:
#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;

}

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

}  

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

}


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

	cin>>a>>b;

	for(int i=1;i<=3;i++){

	    if(i!=a && i!=b){

	        cout<<i;

	        return 0;

	    }

	}

	return 0;

}


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

}

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

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

        cout<<"2";

    else

        cout<<"1";

}


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

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

    }

}


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

}

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

int main ()

{

	int a,b;

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

	printf("%d",6-a-b);

}
// Slower C++ solution:
#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;

}  

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

int main ()

{

	int a,b;

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

	printf("%d",6-a-b);

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

int main ()

{

	int a,b;

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

	printf("%d",6-a-b);

}
// Slower C++ solution:
#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;

}


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

int main ()

{

	int a,b;

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

	printf("%d",6-a-b);

}
// Slower C++ solution:
#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;

}


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

int main ()

{

	int a,b;

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

	printf("%d",6-a-b);

}
// Slower C++ solution:
#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;

}

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

int main ()

{

	int a,b;

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

	printf("%d",6-a-b);

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

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

        cout<<"2";

    else

        cout<<"1";

}


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

int main ()

{

	int a,b;

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

	printf("%d",6-a-b);

}
// Slower C++ solution:
#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;

    }

}


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

int main ()

{

	int a,b;

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

	printf("%d",6-a-b);

}
// Slower C++ solution:
#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;

}

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

}  

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

}


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

	cin>>a>>b;

	for(int i=1;i<=3;i++){

	    if(i!=a && i!=b){

	        cout<<i;

	        return 0;

	    }

	}

	return 0;

}


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

int main (){

	

	int A, B;

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

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



	return 0;

	

}