#include <stdio.h>
#define MAX(A,B) ((A>B)?A:B)
int main() {
    int a, b, c;
    scanf("%d%d", &b, &c);
    if (b+c>=256) {
        printf("0\n");
        return 0;
    }

    a = 256 - MAX(b, c);
    printf("%d\n", a);
    return 0;
}