#include <iostream>

using namespace std;

int trud(int b, int c)
{
    if(b + c >= 256)
        return 0;
    return 256 - max(b, c);
}

int main()
{
    int b;
    int c;

    cin >> b;
    cin >> c;

    cout << trud(b, c);

    return 0;
}