#include <stdio.h>

int main(){
    int b,c,a,suma,rez;
    scanf("%d %d", &b,&c);
    suma = b + c;
    rez = 0;
    if(suma >= 256)
        rez = 0;
    if(suma < 256)
       rez = 256 - suma;

    printf("%d", rez);
    return 0;
}