#include <iostream>

using namespace std;

int main()
{
    int B,C , max;
    cin >> B >> C;
    if(B + C >= 256)
    {
        cout << 0;
    }
    else{
        if(B < C)
            max = C;
        else
            max = B;
        cout << (256 - max);
    }
    return 0;
}