#include<bits/stdc++.h>
#define pii pair<int,int>
#define ll long long
#define pll pair<ll,ll>
#define pb push_back
using namespace std;
ll digni(ll x,ll y)
{
    if(y==0)return 1;
    if(y%2==0)
    {
        ll res=digni(x,y/2);
        return (res*res)%mod;
    }
    return (digni(x,y-1)*x)%mod;
}


int main() {
	ios_base::sync_with_stdio(false);
	cin.tie(nullptr);
	cout.tie(nullptr);
	
	int b,c;
    cin>>b>>c;

    int sum = b + c;
    int maxx = max(b,c);
    if(sum >= 256)
    {
        cout<<"0\n";
    }
    else{
        cout<<256 - maxx<<"\n";
    }
 	return 0;
}