#include <iostream>
using namespace std;
/* run this program using the console pauser or add your own getch, system("pause") or input loop */

int main(int argc, char** argv){
	int b,c,a;
	cin>>b>>c;
	if(b+c>=256){
		a=0;
	}
	else{
		if(b>c){
			a=256-b;
		}
		else{
			a=256-c;
		}
	}
	cout<<a;
	return 0;
}