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

int main()
{
    long int B, C;
    cin>>B>>C;
    if(B+C>=256)
    cout<<"0";
    else
	{
    	if(B>C)
    	cout<<abs(256-B);
    	else
    	cout<<abs(256-C);
	}
    return 0;
}