#include <bits/stdc++.h>

using namespace std;

int main()
{
    int a, b, c;
    int granica = 256;
    cin >> b >> c;
    if(b + c >= granica){
        a = 0;
    }
    else{
        if(b > c){
            a = granica - b;
        }
        if(c > b){
            a = granica - c;
        }
    }
    cout << a << endl;
    return 0;
}