#include <iostream>

using namespace std;

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