#include <iostream>

using namespace std;

int main()
{
    int b, c;
    cin>>b>>c;
    int a;

    if(b+c>=256)a=0;
    else if(b+c<256 and b<c)a=256-c;
    else a=256-b;

    cout<<a;
    return 0;
}