#include <bits/stdc++.h>

using namespace std;

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