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

int A,B,C,drtr,maxPDPT;

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

    drtr = B + C;

    maxPDPT = max(A + B,A + C);

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

    return 0;
}