#include<iostream>

main()
{
	int b, c;
	scanf("%d%d", &b, &c);
	if(b+c>=256)
		printf("0");
	else if(b>c)
	{
		int rez = 256 - b;
		printf("%d",rez);
	}
	else
	{
		int rez = 256 - c;
		printf("%d",rez);
	}
}