#include <bits/stdc++.h>
using namespace std;
#define ll long long

void solve(){
int a,b,c;
cin>>a>>b;

if(a+b>=256)
	cout<<0<<"\n";
else if(a+b<=256 && a>b){
	c = 256-a;
	cout<<c<<"\n";
}
else if(a+b<=256 && a<b){
	c = 256-b;
	cout<<c<<"\n";
}

}

int main(){

ios::sync_with_stdio(0);
cin.tie(0);
solve();
return 0;
}