#include <bits/stdc++.h>

using namespace std;

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

    int b, c;

    cin >> b >> c;

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