#include <iostream>
using namespace std;
/* run this program using the console pauser or add your own getch, system("pause") or input loop */

int main(int argc, char** argv) {
	long long a1,a2,a3,min;
	cin>>a1>>a2;
	if(a1+a2>=256){
		a3=0;
	}
	else{
		if(a1>a2){
			a3=256-a1;
		}
		if(a2>a1){
			a3=256-a2;
		}
	}
	cout<<a3;
	return 0;
}