#include <bits/stdc++.h>
using namespace std;
int B,C;

int main()
{
 cin>>B>>C;

     if (B+C<=256)
        cout<<256-(B+C)<<endl;
     else if (B>256)
        cout<<0<<endl;
     else if (C>256)
        cout<<0<<endl;



 return 0;
}