#include <iostream>

using namespace std;

int main()
{
    int a, b;
    cin>>a>>b;
    if(a+b>256){
        cout<<0;
    }
    else{
        if(a>b){
            cout<<256-a;
        }
        else{
            cout<<256-b;
        }
    }
}