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

int main(int argc, char** argv) {
	int a, b, c, x;
	cin >> b >> c;
	if(b+c>=256) a = 0;
	else a = 256 - max(a, b);
	cout << a << endl;
	return 0;
}