#include <iostream>
#include <vector>
#include <math.h>
#include <algorithm>

using namespace std;

int main(){
	ios_base::sync_with_stdio(false);
	int b,c,a;
	cin >> b >> c;
	if (b+c>=256) a = 0;
	else a = 256 - max(b,c);
	cout << a; 
}