#include <iostream>

using namespace std;

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