#include<bits/stdc++.h>
#include<ext/pb_ds/tree_policy.hpp>
#include<ext/pb_ds/assoc_container.hpp>

using namespace std;
using namespace __gnu_pbds;

template<typename temp>using ordered_set = tree<temp, null_type, less_equal<temp>, rb_tree_tag,tree_order_statistics_node_update>;
//order_of_key(k)  : Number of items strictly smaller than k .
//find_by_order(k) : K-th element in a set (counting from zero).//*(ost.find_by_order(k))

#define PI acos(-1)

//int dx[]={-1,1,0,0};
//int dy[]={0,0,-1,1};
//int dx[]={-1,0,1,-1,1,-1,0,1};
//int dy[]={1,1,1,0,0,-1,-1,-1};

const int M=1e5+5;
const int N=2e5+5;
const int mod=1e9+7;

int main()
{
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);
    int a,b,c;
    cin >> a >> b;
    if(a == b)cout << a;
    else cout << 3-a-b;
    return 0;
}

/*
	Created on 19-12-20 15:05

	@author: roastedcoder
*/
#include<bits/stdc++.h>
using namespace std;
typedef unsigned long long ull;
const int MOD = 1e9 + 7;
const int INF = INT_MAX;
const int MAX = 4e6 + 5;
const int N = 1e5 + 5;
//const int MAXX = 1e14;

#define ll long long
#define int ll
#define all(x) x.begin(), x.end()
#define endl "\n"
#define pb push_back
#define mp make_pair
#define roastedcoder ios_base::sync_with_stdio(false); cin.tie(NULL);
int    dx[] = {-1,  0,  1,  0, -1, -1,  1,  1};
int    dy[] = { 0,  1,  0, -1, -1,  1,  1, -1};
char  dir[] = {'U','R','D','L'};
int power(int a, int b);
int powmod(int a, int b, int mod);
//__________________________________________________________________


//int main(){
int32_t main() {
	roastedcoder
	int n, w; cin>>n>>w;
	cout<<n/w<<endl;
}

//__________________________________________________________________
/*
Sample Input:


Sample Output:


*/

// Template Functions
int power(int a, int b) {
	int res = 1;
	while(b>0) {
		if(b%2) res *= a;
		b /= 2, a *= a; } return res;
}
int powmod(int a, int b, int mod) {
	int res = 1;
	while(b>0) {
		if(b%2) res = (res%mod * a%mod)%mod;
		b /= 2;
		a = (a%mod * a%mod)%mod;
	}
	return res%mod;
}