#include <bits/stdc++.h>

using namespace std;

int B,C;

int main () {
    
    cin>>B>>C;
    
    if ((B+C)<256) {
        cout<<256-max(B,C)<<endl;
    
    }
    else 
        cout <<"0"<<endl;
    
    return 0;
}