#include <bits/stdc++.h>

using namespace std;

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