#include <iostream>
using namespace std;
int maxi (int a,int b)
{
    if (a>b)
        return a;
    return b;
}
int main ()
{
    int resenje=0,b,c;
    cin>>b>>c;
    if (b+c>=256)
    {
        cout<<resenje;
        return 0;
    }
    resenje = 256-maxi(b,c);
    cout<<resenje;
    return 0;
}