#include<bits/stdc++.h>

using namespace std;

int main(){
	ios_base::sync_with_stdio(false);
	cin.tie(0);
	
	int A, B, C, max = 0;
	
	cin >> B >> C;
	max = B;
	if (C > max)max = C;
	if (B + C >= 256)A = 0;
	else A = 256 - max;
	cout << endl << A;
	
	return 0;
}