#include <stdio.h>
int main()
{
	int A, B, C, min=256;
	scanf("%d %d", &B, &C);
	if (B < C)
	{
		A = min - C;
		printf("%d", A);
	}
	else if (B > C)
	{
		A = min - B;
		printf("%d", A);
	}
	else if(B > min || C > min)
	{
		A = 0;
		printf("%d", A);
		
	}

	return 0;
	
	
}