#include <iostream>

using namespace std;

int main()
{
    int A,B,C,maks=0,mini=0;
    cin >> B >> C;
    if(B+C>=256)
        cout << 0;
    else
    {
        if(B>C)
            {
                maks=B;
                mini=C;
            }
        else
            {
                maks=C;
                mini=B;
            }
        A=256-maks;
        if(A>mini)
            cout << A;
        else
            cout << 0;
    }

    return 0;
}