#include <iostream>
using namespace std;

int main()
{
	int a, b, c;
	cin >> b >> c;
	const int Max = 256;

	if (b + c >= Max) {
		a = 0;
	}
	else
		if (b > c) {
			a = 256 - b;
		}
		else a = 256 - c;

	cout << a << endl;

	return 0;
}