#include <iostream>
using namespace std;

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