#include <iostream>
using namespace std;
int main()
{
	int B,C;
	cin>>B>>C;
	if(B>=256 || C>=256 || B+C>=256)
		cout<<0;
	else if(B<C)
		cout<<256-C;
	else if(B>C)
		cout<<256-B;
	else if(B==C)
		cout<<256-B;
}