#include <iostream>

using namespace std;

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