#include <iostream>

using namespace std;
int main()
{

    int maxx=256;
    int A;
    int B;
    cin>>A;
    cin>>B;
    if(A+B>=256) cout<<0<<endl;
    else{
        int k=max(A,B);
        cout<<256-k<<endl;
    }
    return 0;
}