#include<iostream>
using namespace std;

int main(){
	int b,c,a,max;
	cin >> b >> c;
	if (b > c){
		max = b;
	}
	else {
		max = c;
	}
	if (b + c >= 256){
		a = 0;
	}
	else {
		a = 256-max;
	}
	cout << a;
}