#include <stdio.h>


int main()
{
    int b,c;
    scanf("%d%d",&b,&c);
    if(b>=256 || c>=256 || b+c>=256){
        printf("0");
        return 0;}

    int m;
    if(b>c) m=b;
    else m=c;
    printf("%d",256-m);
}