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

int main()
{
    int A, B, C;
    cin >> B >> C;
    if(B > C)
        A = 256 - B;
    else if(C > B)
        A = 256 - C;
    if(A < 0)
        A = 0;
    cout << A;
    return 0;
}