#include <bits/stdc++.h>
#include <math.h>
using namespace std;
#define ll long long
#define ld long double
#define pb push_back
#define mp make_pair
#define ins insert
#define vi vector<int>
const int mxN = 1e9;
const ll mod = 1e9 + 7;

int main()
{
    int b, c;
    cin >> b >> c;
    if (b + c >= 256)
        cout << "0";
    else
        cout << 256 - max(b, c);
    return 0;
}