#include <iostream>

using namespace std;

int max(int i1, int i2){
    if(i1 > i2){
        return i1;
    }
    return i2;
}

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