#include <iostream>
using namespace std;

int main() {
	int krug1 = 0, krug2 = 0, max;
	cin >> krug1 >> krug2;
	if (krug1 > krug2)max = krug1;
	else max = krug2;

	if (256 - (krug1 + krug2) < 0) {
        int nula = 0;
		cout << nula;
	}
	else {
		cout << 256 - max;
	}

	






	return 0;
}