#include<iostream>
using namespace std;
int poeni(int x2,int x3)
{   int maks=0;
    if(x2+x3>=256)
    {
        return 0;
    }
    if(x2>=x3)
        maks=x2;
    else
        maks=x3;
    return 256-maks;
}
int main ()
{
    int x1,x2,x3;
    cin>>x2>>x3;
    cout<<poeni(x2,x3);



    return 0;
}