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

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