#include <bits/stdc++.h>

using namespace std;

int main()
{
    int b, c;

    cin >> b >> c;

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