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

int main()
{
int a, b, c, max;
scanf("%d%d",&b, &c);
max = b;
if((b >= 256) || (c >= 256))
    {
        printf("0");
    }
        else
        {
            if (c > b)
            {
                max = c;
            }
    a = 256 - max;

        printf("%d",a);
        }

return 0;
}