#include <stdio.h>

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