#include<bits/stdc++.h>
using namespace std; 

int main()
{   
    ios_base::sync_with_stdio(false); 
    cin.tie(0);
    cout.tie(0);
    
    int A,B,C;
    
    cin >> B >> C;
    if(B + C >= 256)
     A = 0;
    else 
     A = 256 - max(B,C);
    
    cout << A;
    
    return 0;
}