#include<iostream>

using namespace std;

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