#include <iostream>

using namespace std;

int main()
{
    int A, B, C, veci, manji;
    cin >> B >> C;
    if (B >= C)
    {
        veci = B;
        manji = C;
    }
    else
    {
        veci = C;
        manji = B;
    }

    if ((B + C) >= 256)
    {
        A = 0;
        cout << A;
    }
    else
    {
       A = 256 - veci;
       cout << A;
    }
}