#include <iostream>
#include <string>
#include <algorithm>

using namespace std;

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

	if (c+b>=256)
	{
		cout << a << endl;
	}

	else
	{
		int najveci = max(c, b);
		int zaprolaz = 256;

		a = zaprolaz - najveci;
		cout << a << endl;
	}




	return 0;
}