#include <iostream>

using namespace std;

const int minimalan = 256;
int b, c, a;

int main()
{
    cin >> b;
    cin >> c;

    if (b + c >= minimalan)
    {
        a = 0;
    }
    else
    {
        int veci = b > c ? b : c;
        a = minimalan - veci;
    }

    cout << a;
}