#include <iostream>

using namespace std;

int main()
{
	ios_base::sync_with_stdio(false);
	cin.tie(0);
	
	int b, c;
	
	cin >> b >> c;
	
	if(b+c >= 256)
	{
		cout << 0 <<endl;
		return 0;
	}
	
	int max = b;
	if (c > max) max = c;
	cout << 256-max <<endl;
	return 0;
}