#include <bits/stdc++.h>  
using namespace std;
int main() {
    ios_base::sync_with_stdio(false);
    short int a, b, c;
    cin >> b >> c;
    if (c>b)
    	a=256-c;
	else 
	    a=256-b;
	if(b+c>=256) cout << 0;
	else cout << a;
	return 0;
}