#include <iostream>

using namespace std;

int main()
{
    int b, c;
    cin >> b >> c;
    int r;

    if((b + c) < 256)
        r = 256 - max(b, c);
    else
        r = 0;

    cout << r;
    return 0;
}