#include <bits/stdc++.h>
#define pb push_back
#define sc scanf
#define pr printf
#define tc int t; cin>>t; while(t--)
#define ccout if(debug) cout

typedef long long ll;
using namespace std;
const int mxN=100010,mxM=1005,mod=1e9+7;
int a, b;
void unos(){

}
void solve(){


}
void ispis(){

}
int main(){
//   tc{
      cin>>a>>b;
      if(b>a) swap(a,b);

      if(a>=256) cout<<0<<endl;
      else if(a+b>=256) cout<<0<<endl;
      else cout<<256-a<<endl;
//   }
   return 0;
}