#include <iostream>
using namespace std;
int veci(int b, int c)
{
    if (b >= c)
        return b;
    else
        return c;
}
int main()
{
    int a, b, c;
    cin >> b >> c;
    if (b + c >= 256)
        cout << 0;
    if (b + c < 256)
    {
        cout << 256 - veci(b, c);
    }
}