#include <bits/stdc++.h>
using namespace std;

#define ios ios_base::sync_with_stdio(false); cin.tie(0); cout.tie(0);
#define ll long long
#define inf INT_MAX
#define llinf LLONG_MAX
#define mt make_tuple
#define parll pair<ll,ll>
#define parii pair<int,int>
#define mp make_pair
#define mod 1000000007

int main()
{
    ios;

    int a,b,c;

    cin >> b >> c;

    if ( b+c >= 256 )
    {
        cout << 0;
    }
    else
    {
        cout << 256-max( b, c );
    }

    return 0;
}