#include <iostream>

using namespace std;

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