#include <iostream>
using namespace std;
int main(){
	ios_base::sync_with_stdio(false);
    cin.tie(NULL);
    cout.tie(NULL);
	unsigned long long a,b,c;
	cin >> b >> c;
	if((b+c)>=256) cout << "0" << endl;
	if((b+c)<256){
		if(b>=c)cout << 256-b <<endl;
		else cout << 256-c <<endl;
	}
	return 0;
}