#include <iostream>
using namespace std;

int main()
{
	long long x,y;
	cin >>x >>y;
	if(x>=256 || y>=256)
	{
		cout <<0;
		return 0;
	}
	else
	{
		if (x>y) cout <<256-x;
		else cout <<256-y;
	}
	return 0;
}