#include<iostream>
using namespace std;
int main(){
int a,b,c,max1,rez;
cin>>a>>b;
rez=256-a;
rez=rez-b;
if(rez<=0){cout<<0;}
else{
if(a>b){max1=a;}
else {max1=b;}
c=256-max1;
cout<<c;


}
return 0;
}