#include <iostream>

using namespace std;

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