#include <iostream>

using namespace std;

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