#include <iostream>
using namespace std;
int main()
{
	int p, d, t,rez;
	cin >> d >> t;
	if (t + d >= 256) {
		cout << 0;
		return 0;
	}
	if (t > d)rez = 256 - t; {
		cout << rez;
		return 0;
	}
	if (d >= t)rez = 256 - d; {
		cout << rez;
		return 0;
	}
}