#include<iostream>
#include<cmath>
using namespace std;

int main() {
	ios_base::sync_with_stdio(false);
	
	int b,c;
	
	cin>>b>>c;
	
	if(b+c >= 256)
		cout<<0;
	else
		cout<<256 - max(b, c);
	
	return 0;
}