#include <iostream>

using namespace std;

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