#include <bits/stdc++.h>

#define pb push_back
#define xx first
#define yy second
#define ll long long
#define pii pair<int, int>

using namespace std;

int main()
{
    ios_base::sync_with_stdio(false);
    int b, c; cin>>b>>c;

    if (b+c>=256) cout<<0;
    else cout<<256-max(b, c);
}