#include <iostream>

using namespace std;

int main() {

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

return 0;
}