#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair<ll,ll> pll;

#define F(type, i, a, b, incr) for (type i = a; i <= (type)(b); i += (type)(incr))
#define pb push_back
#define ppb pop_back
#define ff first
#define ss second
#define iter(it, s) for (auto it = s.begin(); it != s.end(); it++)
#define fillc(a,b) memset(a,b,sizeof(a))
#define MOD 1000000007
#define INF 1e17

void solve()
{
	ll x,y;
	cin>>x>>y;
	set<ll> s;
	s.insert(0);
	s.insert(1);
	s.insert(2);
	if(x==y)
	{
		cout<<x<<endl;
	}
	else
	{
		s.erase(x);
		s.erase(y);
		cout<<*s.begin()<<endl;
	}
}

int main()
{
    //freopen("input.txt","r",stdin);freopen("output.txt","w",stdout);
    ios_base::sync_with_stdio(false);
    cin.tie(0);
    cout.tie(0);
        solve();
}
        #include<iostream>
        #include<bits/stdc++.h>
        #include<string>
        #include<algorithm>
        #define ll long long
        #define pb push_back
        #define pob pop_back
        #define mp make_pair 
        #define lb lower_bound
        #define ub upper_bound
        #define loop(i,n) for(i=0;i<n;i++)
        #define loop1(i,n) for(i=1;i<=n;i++)
        #define Loop(i,n,x) for(i=0;i<n;i+=x)
        #define Loop1(i,n,x) for(i=1;i<=n;i+=x)
        #define all(a) a.begin(),a.end()
        #define allr(a) a.rbegin(),a.rend()
        #define mem(name,val) memset(name,val,sizeof(name))
        const long long  MOD=(ll)1000000007;
        ll fact[100005];
        using namespace std;
        int main()
        {
            ll n,k;
            cin>>n>>k;
            while(k--)
            {
                if(n%200)
                {
                    n=n*1000+200;
                }
                else n/=200;
            }
            cout<<n<<endl;

        }