#include <iostream>

using namespace std;

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