#include <iostream>

using namespace std;

int main()
{
    int A,B,C;
    cin>>B>>C;
    if (B+C<256)
    {
        if (B>C)
            cout<<256-B<<endl;
        else
            cout<<256-C<<endl;
    }
    else if (B+C<=256)
        cout<<0<<endl;
    return 0;
}