#include <iostream>

using namespace std;

int main()
{
    int b, c, m;
    cin >> b >> c;
    m = (b > c)? b : c;
    if(b+c >= 256) cout << 0 << endl;
    else cout << 256 - m << endl;
    return 0;
}