#include <stdio.h>

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

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