#include <bits/stdc++.h>

using namespace std;

int main()
{
    int p, q, n=0;
    int maks = 256;
    cin >> p >> q;
    if(maks > (p+q))
        cout << maks-max(p,q);
    else
        cout << n;
}