#include <iostream>

using namespace std;

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

    }
    return 0;
}