#include <iostream>
#include <cmath>

using namespace std;

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

    int b, c;

    cin >> b >> c;

    cout << (b+c<256)*(256-max(b,c));

    return 0;
}