#include <bits/stdc++.h>
using namespace std;
int a,b,c,mx;
int main () {
    cin>>b>>c;
    if(b+c<256){
        mx=max(b,c);
        cout<<256-mx<<endl;
    }
    else cout<<0<<endl;
    return 0;
}