#include <iostream>

using namespace std;

int main()
{
    int B;
    int C;
    cin>>B;
    cin>>C;
    if(B>256)cout<<0<<endl;
    else if(C>256)cout<<0<<endl;
         else if(B>C){
            cout<<256-B<<endl;}
              else if(B==C){
                cout<<256-B<<endl;}
                else  if(B<C){
                    cout<<256-C<<endl;}

    return 0;
}