#include <iostream>

using namespace std;

int main()
{
    int x, y;

    cin>>x>>y;

    if(x+y>=256)
        cout<<0;
    else
        {
            if(x>y)
               cout<<256-x;
            else
               cout<<256-y;

        }



    return 0;
}