#include <iostream>
#include <cstdlib>

using namespace std;

int main() 
{
	int A,B,C;
	cin>>B>>C;
	if (B>C && (B+C)<256) A=256-B;
	if (C>B && (B+C)<256) A=256-C;
	if (B+C>256) A=0;
	cout<<A<<endl;
	system ("PAUSE>>null");
	return 0;
}