#include <bits/stdc++.h>
#define mod 998244353
#define ll long long
#define ull unsigned long long
#define inf 1e15
#define pb push_back
#define popb pop_back
#define fi first
#define sc second
#define pii pair<int,int>
#define sz(a) int(a.size())
#define all(a) a.begin(),a.end()
#define rall(a) a.begin(),a.end(),greater<int>()
using namespace std;

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