#include<bits/stdc++.h>
using namespace std;
int main(int argc, char** argv) {
	int c,b;
	cin>>c;
	cin>>b;
	if((b+c)>=256)
	cout<<0;
	else {
		if (b>c) 
		cout<<256-b;
		else
		cout<<256-c;
	}
	return 0;
}