#include <iostream>

using namespace std;

int main()
{
    int krug1;
    int krug2;
    int krug3;
    cin>>krug2;
    cin>>krug3;
    int temp;

    if(krug2+krug3>=256){
        krug1=0;
    }else{
        if(krug2>krug3){
            krug1=256-krug2;
        }else{
            krug1=256-krug3;
        }
    }

    cout<<krug1<<endl;
    return 0;
}