#include <iostream>

using namespace std;

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

    return 0;
}