#include <stdio.h>
#include <stdlib.h>

main()
{
    int B,C;
    scanf("%d %d",&B,&C);

    int d=B+C;

    if(d>=256)
        printf("0");
    else
    {
        if(B>=C)
            printf("%d",256-B);
        else
            printf("%d",256-C);
    }
}