#include <iostream>

using namespace std;

int main()
{
    int b,c;
    cin>>b>>c;
    if(b+c>=256)
    {
        cout<<0;
    }
    else
    {
        int maks;
        if(b>=c)maks=b;
        else maks=c;
        cout<<256-maks;
    }
    return 0;
}