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

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