#include <iostream>
#include <cmath>

using namespace std;

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