#include <iostream>
using namespace std;

int max(int x, int y)
{
	if(x>y)
		return x;
	else if(x<y)
		return y;
	else
		return x;
}

int main()
{
	int a,b,c;
	cin>>b>>c;
	
	if(b+c>=256)
	{
		a = 0;
		cout<<a;
	}
	if(b+c<256)
	{
		a = 256 - max(b,c);
		cout<<a;
	}
}