#include <bits/stdc++.h>

using namespace std;

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