#include <bits/stdc++.h>
#define K int(1e9 + 10)
#define INF int(1e9)
#define MOD (long long)(1e9 + 7)
#define endl "\n"
using namespace std;
typedef unsigned int ui;
typedef long long ll;
typedef unsigned long long ull;

void solve(){
    int b, c;
    cin >> b >> c;
    if (b + c >= 256) cout << 0 << endl;
    else cout << 256 - max(b, c) << endl;
}
 
int main(){
    //freopen("input.txt","r",stdin);
    //freopen("output.txt","w",stdout);
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);
 
    int t = 1;
    //cin >> t;
    while (t--)
        solve();
 
    return 0;
}