/// created by ricpe13 ///
#include <bits/stdc++.h>

using namespace std;

int main()
{
    int a, b;
    cin >> a >> b;
    if (a+b>=256) {
        cout << "0" << endl;
    }
    if (a+b<256) {
        if (a>b) {
            cout << 256 - a << endl;
        }
        if (b>a) {
            cout << 256 - b << endl;
        }
        if (a==b) {
            cout << 256 - a << endl;
        }
    }

    return 0;
}