#include <stdio.h>

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

    return 0;
}