#include <iostream>

using namespace std;

int Max(int x, int y) {
    if (x > y) {
        return x;
    }
    else {
        return y;
    }
}

int main() {
    int a, b, c;
    cin >> b >> c;

    if (b + c >= 256) {
        a = 0;
    }
    else {
        a = 256 - Max(b, c);
    }

    cout << a << endl;

    return 0;
}