#include<iostream>
using namespace std;
int A,B,C,maks,d=256;
int main(){
	cin.tie(NULL);
    cout.tie(NULL);
	cin>>B>>C;
	if(B>C)maks=B;
	else maks=C;
	if(B+C>=d)A=0;
	else A=d-maks;
	cout<<A;
	return 0;
}