#include <bits/stdc++.h>

using namespace std;

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