#include <bits/stdc++.h>
using namespace std;

int main()
{
    ios::sync_with_stdio(0);
    cin.tie(0);

    int A, B;
    cin >> A >> B;
    if(A + B >= 256) cout << "0" << "\n";
    else if(A >= B) cout << 256 - A << "\n";
    else cout << 256 - B << "\n";
}