#include <iostream>

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