#include <bits/stdc++.h>
using namespace std;

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