#include <iostream>
using namespace std;
int main(){
	unsigned long long a,b,c,max1=0,max2=0;
	cin >> b >> c;
	if((b+c)>=256)printf("0");
	if((b+c)<256){
		if(b>=c)cout << 256-b <<endl;
		else cout <<256-c <<endl;
	}
}