#include <stdio.h>
#include <stdlib.h>
#define MAX(a, b) ((a) > (b) ? (a) : (b))

int main()
{
    int B,C,G,A;
    scanf("%d%d", &B, &C);
    G = MAX(B,C);
    if(B + C < 256)
       A = 256 - G;
    else A = 0;
    printf("%d", A);


    return 0;
}