#include <iostream>
using namespace std;


int main() {
	
	int A,B,C,razlika=256;
    const D==0
	
	cin>>A>>B;
	
	if((A+B)==256) cout<<D;
	 else if (A>B) 
	  C=razlika-A;
	   cout<<C;
	
	
	return 0;
}