#include <iostream>

using namespace std;

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