// ConsoleApplication1.cpp : This file contains the 'main' function. Program execution begins and ends there.
//

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

int main()
{
	int A, B, C;
	cin >> B;
	cin >> C;
	if (B+C<256){
		A = 256 - max(B, C);
	}
	else {
		A = 0;
	}
	cout << A << endl;
}