#include <iostream>
using namespace std;


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