#include <stdio.h>
#include <stdlib.h>

int main()
{
    int b,c;

    scanf("%d",&b);
    scanf("%d",&c);

    int veci;

    if(b >= c){
        veci = b;
    }
    if(c >= b){
        veci = c;
    }

    int n;

    int prolaz = 256;

    if(veci >= prolaz){
        n = 0;
    }
    else{
         n = prolaz - veci;
    }





    printf("%d",n);

    return 0;
}