#include <bits/stdc++.h>

using namespace std;

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

    return 0;
}