#include <iostream>

using namespace std;

int main()
{
    int a, b, c, x;
    int p = 256;
    cin >> b >> c;
    if(c + b >= p) a = 0;
    else{
        x = max(b, c);
        a = p - x;
    }
    cout << a;



    return 0;
}