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

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

    if (b + c >= 256) cout << "0" << endl;
    else
    {
        int a = 256 - max(b, c);
        cout << a << endl;
    }

    return 0;
}