#import<iostream>
using namespace std;
main()
{
    int b, c;
    cin >> b;
    cin >> c;
    if (b+c >= 256)
    {
            cout << 0;
    }
    else if (b>=c)
    {
            cout << 256 - b;
    }
    else if (c>b)
    {
            cout << 256-c;
    }
}