#include <bits/stdc++.h>
#define ll long long
#define ull unsigned long long
#define pb push_back
#define fi first
#define se second
#define ld long double
#define MAXC 10000000

using namespace std;

void solve() {
	int a,b;
	cin >> a >> b ; 
	if ( a+b >= 256 ) {
		cout << 0 << endl ;
		return ;
	}
	cout << 256 - max(a,b) << endl ;
} 


int main () {
 	/*
    #ifndef ONLINE_JUDGE
        freopen("input.txt","r",stdin);
        freopen("output.txt","w",stdout);
    #endif
 	/*/
    ios_base::sync_with_stdio(false);
    cin.tie(0);
    cout.tie(0);

 
    int t =1;
    //cin >>t ;
    while(t--) 
        solve();
}