#include<bits/stdc++.h>
using namespace std;
int main(){
	int a,b,c;
	cin>>b;
	cin>>c;
	if(b+c<256&b>=0&c>=0&b<=500&c<=500){
		if(b>c|b==c&b+c<256){
			a=256-b;
			cout<<a<<endl;
			}
			else if(c>b&b+c<256){
				a=256-c;
				cout<<a<<endl;
}
		}
			if(b+c>=256&b>=0&c>=0&b<=500&c<=500){
				a=0;
				cout<<a<<endl;
			}
		if(b<0|c<0|b>500|c>500){
		cout<<"Greska, broj bodova mora da bude izmedju 0 i 500!"<<endl;
	}
	
	system("pause");
	return 0;
}