#include<iostream>
using namespace std;

int main()
{
	int a, b, c;
	a = 0;
	cin >> b >> c;

	int max = std::max(b,c);
	int min = std::min(b,c);

	if (max + min >= 256)
	{
		a = 0;
	}
	else if (max + min < 256)
	{
		a = 256 - max;
	}
	
	cout << a;
}