#include<bits/stdc++.h>
#define ll long long
#define pb push_back
#define ff first
#define ss second
using namespace std;
int b,c;
int main () {
cin.tie(NULL);
ios_base::sync_with_stdio(false);
cin>>b>>c;
if(b+c>=256){
    cout<<0<<endl;
}
else {
    cout<<256-max(b,c)<<endl;
}
return 0;
}