#include <iostream>

using namespace std;

int main()
{
    int a, b, c;
    cin >> b >> c;
    if((b + c) >= 256)
    {
        a = 0;
        cout << a << endl;
    }
    else
        {
            if(b < c)
            {
                b = c;
            }
            a = 256 - b;
            cout << a << endl;
        }
    return 0;
}