#include <iostream>

using namespace std;

int main()
{
            int A = 0, B, C, max;
            scanf("%d%d",&B,&C);
            max = B;
            if(B + C < 256)
            {
                if(C > max)
                {
                    max = C;
                }
                A = 256 - max;
            }
            printf("%d",A);
}