#include <iostream>

using namespace std;

int main(void)
{
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);
    cout.tie(NULL);
    int A,B,C, sum = 0;
    cin >> B >> C;
    sum = B + C;
        if(sum < 256)
            A = 256 - max(B,C);
        else{
            A = 0;
        }
    cout << A << endl;
    return 0;
}