#include <iostream>
using namespace std;
int main()
    {int B,C;
    cin>>B>>C;
    if(B+C>=256)
        cout<<0;
    else
        {if (B>C)
            cout<<256-B;
        else
            cout<<256-C;}
    return 0;}