#include <stdio.h>
#include <stdlib.h>
int main()
{
	int a, b, c;
	scanf("%d %d", &b, &c);
	if(b+c<256){
		if(b>=c)
			a = 256 - b;
		else
			a = 256 - c;
	}else{
		a = 0;
	}	
	printf("%d", a);
	return 0;
}