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