#include <iostream>

using namespace std;

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