#include <bits/stdc++.h>

using namespace std;

int a,b;

int main () {

    cin>>a>>b;
    if (a + b <256){
        cout<<256-max(a,b)<<endl;

    }
    else if (a>=256 or b>=256)
    {
        cout<<0<<endl;

    }

return 0;
}