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

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

    }
    //printf("Hello world!\n");
    return 0;
}