#include <bits/stdc++.h>

#define ll long long
#define ld long double
#define endl "\n"

using namespace std;

int main()
{
    ios::sync_with_stdio(false); cin.tie(0); cout.tie(0);

    int a,b; cin >> a >> b;

    if(a+b>=256)
        cout << "0" << endl;
    else
        cout << 256-max(a,b) << endl;

    return 0;
}