#include <bits/stdc++.h>
using namespace std;
int b,c,a,r;
int main()
{
    cin>>b>>c;
    if(b+c>=256)r=0;
    else if(b>=c)r=256-b;
    else r=256-c;
    if(r>=0)cout<<r;
    else cout<<"0";
    return 0;
}