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

int A,B,C,prdr,drtr,prtr,maxPDPT;

int main(){
    cin >> B >> C;

    prdr = A + B;
    drtr = B + C;
    prtr = A + C;

    maxPDPT = max(prdr,prtr);

    if(drtr >= 256){
        cout << 0;
    }
        else if(drtr < 256){
           cout << 256 - maxPDPT;
        }

    return 0;
}