#include <iostream>
#include <bits/stdc++.h>
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) {
	int a,b;
	cin>>a>>b;
	if(a<b) { int p=a;  a=b; b=p;}
	int x=(a+b>=256) ? 0:(256-a);
	cout<<x;
	
	return 0;
}